@arcgis/ai-components 5.2.0-next.11 → 5.2.0-next.110
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/LICENSE.md +4 -2
- package/README.md +2 -2
- package/dist/agent-utils/BaseAgent.js +1 -1
- package/dist/agent-utils/FunctionAgent.js +1 -1
- package/dist/agent-utils/LLMAgent.d.ts +5 -2
- package/dist/agent-utils/LLMAgent.js +7 -4
- package/dist/agent-utils/WorkflowAgent.js +15 -16
- package/dist/agent-utils/index.d.ts +78 -0
- package/dist/agent-utils/index.js +117 -98
- package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/agent-utils/middlewares/middleware.js +1 -1
- package/dist/agent-utils/middlewares/trace.d.ts +2 -0
- package/dist/agent-utils/middlewares/trace.js +1 -1
- package/dist/agent-utils/middlewares/types.js +1 -1
- package/dist/agent-utils/tools/FunctionTool.js +1 -1
- package/dist/agent-utils/types.d.ts +13 -13
- 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/AgenticWorkflowRuntime.d.ts +24 -0
- package/dist/agentic-workflow/Edge.d.ts +16 -0
- package/dist/agentic-workflow/WebAgent.d.ts +39 -0
- package/dist/agentic-workflow/jsonTypes.d.ts +189 -0
- package/dist/agentic-workflow/nodes/AgentNode.d.ts +28 -0
- package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
- package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
- package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
- package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
- package/dist/agentic-workflow/types.d.ts +29 -0
- package/dist/agents/runtime/skill/createSkillAgent.d.ts +31 -0
- package/dist/agents/runtime/skill/createSkillAgent.js +260 -0
- package/dist/agents/runtime/skill/loadAgentSkills.d.ts +16 -0
- package/dist/agents/runtime/skill/types.d.ts +28 -0
- package/dist/agents/runtime/skill/types.js +2 -0
- package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/clearFilters/adapter.js +22 -0
- package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/resetMap/adapter.js +22 -0
- package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +122 -0
- package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
- package/dist/agents/tools/help/listFields/adapter.js +30 -0
- package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
- package/dist/agents/tools/navigation/goToAddress/adapter.js +60 -0
- package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToBookmark/adapter.js +30 -0
- package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToFeatures/adapter.js +50 -0
- package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToFullExtent/adapter.js +27 -0
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +24 -0
- package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToLayer/adapter.js +26 -0
- package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToScale/adapter.js +21 -0
- package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToViewpoint/adapter.js +42 -0
- package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToZoom/adapter.js +21 -0
- package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getAttribute/adapter.js +40 -0
- package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getStatistics/adapter.js +158 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.js +145 -0
- package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/queryFeatures/adapter.js +131 -0
- package/dist/agents/tools/search/findRelevantFields/adapter.d.ts +8 -0
- package/dist/agents/tools/search/findRelevantFields/adapter.js +57 -0
- package/dist/agents/tools/search/findRelevantLayers/adapter.d.ts +8 -0
- package/dist/agents/tools/search/findRelevantLayers/adapter.js +38 -0
- package/dist/agents/tools/shared/resolveToolArtifact.d.ts +22 -0
- package/dist/agents/tools/shared/resolveToolArtifact.js +20 -0
- package/dist/agents/tools/shared/types.d.ts +22 -0
- package/dist/agents/tools/shared/types.js +6 -0
- package/dist/cdn/24EIZVUM.js +2 -0
- package/dist/cdn/25MBI4PD.js +2 -0
- package/dist/cdn/275FFTBE.js +2 -0
- package/dist/cdn/27CK3JHY.js +2 -0
- package/dist/cdn/2F4TPWZQ.js +2 -0
- package/dist/cdn/2LVYAXHG.js +44 -0
- package/dist/cdn/2UJPYWWZ.js +3 -0
- package/dist/cdn/2WXXSZP5.js +2 -0
- package/dist/cdn/{Q7TL5Q5N.js → 3KNLFIM3.js} +2 -2
- package/dist/cdn/3PPXAIRE.js +14 -0
- package/dist/cdn/45BDE3MG.js +2 -0
- package/dist/cdn/477I66FH.js +56 -0
- package/dist/cdn/4CFCV47G.js +2 -0
- package/dist/cdn/4IWDBEMN.js +34 -0
- package/dist/cdn/4OI4QEV7.js +6 -0
- package/dist/cdn/{DXVU45KM.js → 4VBOTWC3.js} +2 -2
- package/dist/cdn/4YOG5F3W.js +2 -0
- package/dist/cdn/53KIFJFA.js +4 -0
- package/dist/cdn/5X23DDDZ.js +2 -0
- package/dist/cdn/65LCK3GG.js +3 -0
- package/dist/cdn/6KWGSXIN.js +2 -0
- package/dist/cdn/7DOYUO7L.js +71 -0
- package/dist/cdn/{WAIFKDR3.js → 7UBTNDV6.js} +2 -2
- package/dist/cdn/7Y43R7QJ.js +2 -0
- package/dist/cdn/A6LBMS7A.js +2 -0
- package/dist/cdn/AP3KPOHN.js +2 -0
- package/dist/cdn/AUCKEB52.js +2 -0
- package/dist/cdn/B3HXSEBN.js +2 -0
- package/dist/cdn/BBEGLIZC.js +2 -0
- package/dist/cdn/BJMGT6GV.js +19 -0
- package/dist/cdn/BTOBEN7Q.js +2 -0
- package/dist/cdn/BTTCBEPW.js +2 -0
- package/dist/cdn/BVUCNXC5.js +2 -0
- package/dist/cdn/CAOMMQSY.js +66 -0
- package/dist/cdn/CKUUYQLO.js +2 -0
- package/dist/cdn/{ZEYIBYSF.js → CSE6BHOJ.js} +2 -2
- package/dist/cdn/CX2HJ67C.js +2 -0
- package/dist/cdn/EGRRZTF6.js +2 -0
- package/dist/cdn/EK3PM4L5.js +2 -0
- package/dist/cdn/EXMEB4X2.js +2 -0
- package/dist/cdn/EYGZJKVD.js +2 -0
- package/dist/cdn/{24QNMEFG.js → FDRAKF5D.js} +2 -2
- package/dist/cdn/FHBRXZLV.js +2 -0
- package/dist/cdn/{5CV7R5IS.js → FK2CVSXW.js} +6 -6
- package/dist/cdn/FLUI6GCU.js +2 -0
- package/dist/cdn/{ZTBA5PM7.js → FPH52WOH.js} +2 -2
- package/dist/cdn/FRYS2PZJ.js +2 -0
- package/dist/cdn/FSLQCZRN.js +2 -0
- package/dist/cdn/{LQ6R5YRN.js → FTTLFIBV.js} +2 -2
- package/dist/cdn/FV6FHLYW.js +2 -0
- package/dist/cdn/G24MNC7D.js +6 -0
- package/dist/cdn/{F6QHMKF5.js → GW3IVAAZ.js} +2 -2
- package/dist/cdn/HI3XKFHD.js +2 -0
- package/dist/cdn/HKIA5PWU.js +2 -0
- package/dist/cdn/{6ZW7Z36F.js → HMMYCSOK.js} +4 -4
- package/dist/cdn/HNTSDY3J.js +2 -0
- package/dist/cdn/HV7MVIQV.js +2 -0
- package/dist/cdn/I3SUE2TR.js +2 -0
- package/dist/cdn/I72ST4JR.js +134 -0
- package/dist/cdn/{T537PKP4.js → IHUWQOMK.js} +2 -2
- package/dist/cdn/JMXXRRKQ.js +22 -0
- package/dist/cdn/JUNMTIB3.js +2 -0
- package/dist/cdn/{6YMR4QSD.js → JYNHWJUZ.js} +2 -2
- package/dist/cdn/KAX4A7SF.js +2 -0
- package/dist/cdn/KBSXHSBX.js +2 -0
- package/dist/cdn/KKCLHXHG.js +2 -0
- package/dist/cdn/L2HLFWCV.js +72 -0
- package/dist/cdn/{7RCQFLPP.js → L3BTURBA.js} +2 -2
- package/dist/cdn/LBTGOMCT.js +2 -0
- package/dist/cdn/LIRT72WY.js +2 -0
- package/dist/cdn/LL324IL6.js +2 -0
- package/dist/cdn/LLY5A2E2.js +2 -0
- package/dist/cdn/LXIKAXUT.js +2 -0
- package/dist/cdn/M2U456J5.js +181 -0
- package/dist/cdn/M3KKORBG.js +2 -0
- package/dist/cdn/M5B6X46F.js +2 -0
- package/dist/cdn/{X2ZDYHCG.js → MZUDIQQH.js} +11 -6
- package/dist/cdn/NBDOPGSN.js +2 -0
- package/dist/cdn/NGR5NVZE.js +2 -0
- package/dist/cdn/{5ZZGKP7N.js → NNPA3NLK.js} +2 -2
- package/dist/cdn/NV7CL4S3.js +2 -0
- package/dist/cdn/{5W7S2RS4.js → OALQBAZR.js} +2 -2
- package/dist/cdn/OF3TAARW.js +2 -0
- package/dist/cdn/{AZGGTNA3.js → OXC2WP7W.js} +2 -2
- package/dist/cdn/PJPP6LOS.js +3 -0
- package/dist/cdn/PUZ6RAFQ.js +2 -0
- package/dist/cdn/QAX6UF4L.js +99 -0
- package/dist/cdn/{NE7E52YR.js → QTEPFTAU.js} +10 -4
- package/dist/cdn/ROS22KOA.js +2 -0
- package/dist/cdn/RSM7MEVT.js +9 -0
- package/dist/cdn/SBNNJ5WA.js +2 -0
- package/dist/cdn/SDX46GZY.js +2 -0
- package/dist/cdn/SI22EJLC.js +2 -0
- package/dist/cdn/SJMAKF4P.js +2 -0
- package/dist/cdn/SNG3WODY.js +2 -0
- package/dist/cdn/STOGCXJH.js +2 -0
- package/dist/cdn/SUC2MIGE.js +2 -0
- package/dist/cdn/SXYKNDOF.js +2 -0
- package/dist/cdn/SZ2L5556.js +2 -0
- package/dist/cdn/T6W6F4TF.js +2 -0
- package/dist/cdn/TB2GJALS.js +2 -0
- package/dist/cdn/TFAJNKBC.js +2 -0
- package/dist/cdn/TLPZELG3.js +2 -0
- package/dist/cdn/TXZQZR3I.js +2 -0
- package/dist/cdn/UAZPINUQ.js +2 -0
- package/dist/cdn/UGIHS7OA.js +2 -0
- package/dist/cdn/{FX7UOGHP.js → V266DJ5V.js} +2 -2
- package/dist/cdn/V4PJMCJZ.js +2 -0
- package/dist/cdn/{P7DG5T3Z.js → V52GSTOC.js} +2 -2
- package/dist/cdn/VGLBH473.js +2 -0
- package/dist/cdn/VK6CCPTG.js +2 -0
- package/dist/cdn/{ZS2TZ6BF.js → VLPELJUS.js} +2 -2
- package/dist/cdn/VT5EWFH7.js +2 -0
- package/dist/cdn/{7CYGX4F4.js → VXLKTQ36.js} +2 -2
- package/dist/cdn/W54XYT2A.js +2 -0
- package/dist/cdn/X42ACC66.js +5 -0
- package/dist/cdn/XNUWVZN7.js +2 -0
- package/dist/cdn/XOTPSCNF.js +2 -0
- package/dist/cdn/XRVGYRXL.js +14 -0
- package/dist/cdn/XV7RMYLR.js +2 -0
- package/dist/cdn/XVJFPZTW.js +2 -0
- package/dist/cdn/XZF7Y6B2.js +2 -0
- package/dist/cdn/{UPEEHMSY.js → Y4TYL2AL.js} +2 -2
- package/dist/cdn/Y4ZOB6UH.js +2 -0
- package/dist/cdn/Y6CV2NZR.js +2 -0
- package/dist/cdn/YIXASZUW.js +2 -0
- package/dist/cdn/YOW3YKWR.js +11 -0
- package/dist/cdn/{23EQTPO3.js → ZA7ZU2F7.js} +2 -2
- package/dist/cdn/ZJWR4W2S.js +208 -0
- package/dist/cdn/ZWIKFBOU.js +2 -0
- package/dist/cdn/ZY3JQCZQ.js +179 -0
- package/dist/cdn/agent-utils/index.js +2 -2
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -2
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
- package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/BaseWorkflow.js +1 -1
- package/dist/chunks/SKILL.js +5 -0
- package/dist/chunks/SKILL2.js +5 -0
- package/dist/chunks/SKILL3.js +22 -0
- package/dist/chunks/SKILL4.js +5 -0
- package/dist/chunks/adapter.js +1127 -2011
- package/dist/chunks/aiFactory.js +94 -0
- package/dist/chunks/arcgisKnowledgeGraph.js +97 -77
- package/dist/chunks/arcgisToolRegistry.js +88 -0
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +20 -3
- package/dist/chunks/arcgis_knowledge_current_map_context.js +32 -3
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
- package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +117 -28
- package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
- package/dist/chunks/baseAgentState.js +58 -0
- package/dist/chunks/converterUtils.js +67 -42
- package/dist/chunks/dataExplorationAgent.js +19 -0
- package/dist/chunks/data_explore_filter_prompt.js +1 -1
- package/dist/chunks/data_explore_query_prompt.js +10 -5
- package/dist/chunks/embeddings.worker.js +1 -1
- package/dist/chunks/fetchAgentContext.js +13 -0
- package/dist/chunks/fetchService.js +10 -0
- package/dist/chunks/fieldStatistics.js +79 -0
- package/dist/chunks/field_descriptions_prompt.js +1 -1
- package/dist/chunks/formatFeatureAttributes.js +132 -0
- package/dist/chunks/generateLayerDescriptions.js +190 -311
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpAgent.js +34 -0
- package/dist/chunks/help_prompt.js +35 -18
- package/dist/chunks/index.js +1 -1
- package/dist/chunks/intent_prompt.js +3 -3
- package/dist/chunks/layerStylingGraph.js +102 -84
- package/dist/chunks/layer_descriptions_prompt.js +1 -1
- package/dist/chunks/layer_styling_prompt.js +1 -1
- package/dist/chunks/mergeWhereClauses.js +15 -0
- package/dist/chunks/navigationAgent.js +27 -0
- package/dist/chunks/navigation_intent_prompt.js +9 -3
- package/dist/chunks/navigation_tool_prompt.js +1 -1
- package/dist/chunks/orchestrator.js +446 -235
- package/dist/chunks/requireAgentServices.js +11 -0
- package/dist/chunks/resolvePointGeometryFilter.js +92 -0
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +22 -28
- 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 +12 -12
- package/dist/chunks/utils3.js +1 -1
- package/dist/components/arcgis-assistant/customElement.d.ts +102 -1
- package/dist/components/arcgis-assistant/customElement.js +332 -184
- package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +533 -11
- package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +35 -9
- package/dist/components/arcgis-assistant-help-agent/customElement.js +32 -9
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
- package/dist/components/arcgis-assistant-interrupt/customElement.js +12 -13
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +13 -9
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +41 -17
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +31 -8
- package/dist/components/arcgis-assistant-message/customElement.d.ts +3 -0
- package/dist/components/arcgis-assistant-message/customElement.js +10 -9
- package/dist/components/arcgis-assistant-message-block/customElement.js +2 -2
- 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.d.ts +3 -0
- package/dist/components/arcgis-assistant-message-loading/customElement.js +12 -11
- 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.d.ts +1 -0
- package/dist/components/arcgis-assistant-message-text/customElement.js +13 -13
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +34 -10
- package/dist/components/arcgis-assistant-speech-input/customElement.js +35 -53
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
- package/dist/components/arcgis-assistant-user-message/customElement.d.ts +2 -0
- package/dist/components/arcgis-assistant-user-message/customElement.js +16 -11
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +7 -7
- package/dist/oauth-callback.html +1 -1
- package/dist/orchestrator/models/types.d.ts +1 -0
- package/dist/orchestrator/orchestrator/orchestratorEvents.d.ts +78 -0
- package/dist/orchestrator/providers/arcgis/aiFactory.d.ts +15 -0
- package/dist/orchestrator/types/types.d.ts +17 -0
- package/dist/types/lumina.d.ts +5 -4
- package/dist/types/preact.d.ts +5 -4
- package/dist/types/react.d.ts +5 -4
- package/dist/types/stencil.d.ts +7 -6
- package/dist/utils/index.d.ts +75 -39
- package/dist/utils/index.js +708 -84
- package/package.json +35 -12
- package/dist/cdn/34SG44C3.js +0 -72
- package/dist/cdn/3JGWGKT6.js +0 -2
- package/dist/cdn/3NBDVZ2I.js +0 -2
- package/dist/cdn/3VOQD2MR.js +0 -2
- package/dist/cdn/434TAA3J.js +0 -2
- package/dist/cdn/53NTYC4I.js +0 -2
- package/dist/cdn/5QAHYX7Y.js +0 -5
- package/dist/cdn/AXDZBBNL.js +0 -45
- package/dist/cdn/B7WJFBOZ.js +0 -2
- package/dist/cdn/BX7FSMUU.js +0 -56
- package/dist/cdn/CHPQM77M.js +0 -181
- package/dist/cdn/DHKUXLU3.js +0 -179
- package/dist/cdn/DQSEBKOX.js +0 -2
- package/dist/cdn/DZ2QWNUA.js +0 -3
- package/dist/cdn/EBISDZ5H.js +0 -2
- package/dist/cdn/ERL2CB2Y.js +0 -14
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/FUIGPHBH.js +0 -2
- package/dist/cdn/H2CHHGGH.js +0 -2
- package/dist/cdn/HWKDNS4K.js +0 -4
- package/dist/cdn/IMQ4TVHF.js +0 -16
- package/dist/cdn/IOD3GDA7.js +0 -2
- package/dist/cdn/IR7PTESF.js +0 -2
- package/dist/cdn/IRZDTYO2.js +0 -2
- package/dist/cdn/JIWK6QK6.js +0 -2
- package/dist/cdn/JLKGS6Y5.js +0 -36
- package/dist/cdn/K3JCH4XW.js +0 -2
- package/dist/cdn/KHXUWZHB.js +0 -2
- package/dist/cdn/KMQ3SP4I.js +0 -5
- package/dist/cdn/LIFK3QSD.js +0 -2
- package/dist/cdn/NXKKG5TK.js +0 -2
- package/dist/cdn/O3EN27N5.js +0 -2
- package/dist/cdn/O3RFFPU3.js +0 -6
- package/dist/cdn/PBO6FZN6.js +0 -2
- package/dist/cdn/Q3ZW4FYA.js +0 -3
- package/dist/cdn/Q6LRANX6.js +0 -2
- package/dist/cdn/QCSN44H4.js +0 -2
- package/dist/cdn/R56X6ZKR.js +0 -161
- package/dist/cdn/RUURNLTP.js +0 -2
- package/dist/cdn/T43LEBBE.js +0 -47
- package/dist/cdn/TR4GFL7X.js +0 -2
- package/dist/cdn/WNS5ZUF5.js +0 -2
- package/dist/cdn/X4XY5HIE.js +0 -2
- package/dist/cdn/XOH56EQ2.js +0 -2
- package/dist/cdn/XON27U6U.js +0 -2
- package/dist/cdn/YIMNOUTF.js +0 -2
- package/dist/cdn/YLN2BZ5J.js +0 -2
- package/dist/cdn/YUKR4AZW.js +0 -2
- package/dist/cdn/Z2G7MP5L.js +0 -22
- package/dist/chunks/dataExplorationGraph.js +0 -310
- package/dist/chunks/helpGraph.js +0 -126
- package/dist/chunks/navigationGraph.js +0 -270
- package/dist/chunks/toolCallResponse.js +0 -31
package/LICENSE.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# Licensing
|
|
2
2
|
|
|
3
|
-
COPYRIGHT
|
|
3
|
+
COPYRIGHT Esri
|
|
4
4
|
|
|
5
5
|
All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
|
|
6
6
|
|
|
7
|
-
This material is licensed for use under the
|
|
7
|
+
This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement.
|
|
8
8
|
You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
|
|
9
9
|
|
|
10
|
+
See use restrictions at https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf.
|
|
11
|
+
|
|
10
12
|
For additional information, contact:
|
|
11
13
|
Environmental Systems Research Institute, Inc.
|
|
12
14
|
Attn: Contracts and Legal Services Department
|
package/README.md
CHANGED
|
@@ -6,5 +6,5 @@ The ArcGIS Maps SDK for JavaScript provides a suite of ready-to-use UI component
|
|
|
6
6
|
|
|
7
7
|
## License
|
|
8
8
|
|
|
9
|
-
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.
|
|
10
|
-
For third party notices, see https://js.arcgis.com/5.
|
|
9
|
+
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.2/LICENSE.txt.
|
|
10
|
+
For third party notices, see https://js.arcgis.com/5.2/third-party-notices.txt.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import m from "@arcgis/core/core/Accessor.js";
|
|
3
3
|
import { property as i, subclass as l } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
4
4
|
import { a as u } from "../chunks/state.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { property as u, subclass as p } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { isGraphInterrupt as m } from "@langchain/langgraph/web";
|
|
4
4
|
import { BaseAgent as d } from "./BaseAgent.js";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { StructuredToolInterface } from "@langchain/core/tools";
|
|
1
2
|
import type { BaseAgent } from "./BaseAgent.js";
|
|
2
3
|
import type { FunctionToolLike } from "./tools/FunctionTool.js";
|
|
3
4
|
import type { AgentCustomState, AgentData, ZodObjectSchema } from "./types.js";
|
|
4
5
|
|
|
6
|
+
export type LLMAgentTool = FunctionToolLike | StructuredToolInterface;
|
|
7
|
+
|
|
5
8
|
/**
|
|
6
9
|
* LLMAgent uses a language model to generate its output based on a provided prompt template and optional tools.
|
|
7
10
|
* It supports structured input and output through Zod schemas, allowing for validation and type safety. The agent's logic is defined by the prompt and the tools it has access to, making it a flexible option for a wide range of use cases.
|
|
@@ -39,8 +42,8 @@ export class LLMAgent<TInput extends AgentData = AgentData, TOutput extends Agen
|
|
|
39
42
|
* @required
|
|
40
43
|
*/
|
|
41
44
|
accessor prompt: string;
|
|
42
|
-
/** The tools property is an optional array of
|
|
43
|
-
accessor tools:
|
|
45
|
+
/** The tools property is an optional array of tools that the agent can use during execution. */
|
|
46
|
+
accessor tools: LLMAgentTool[] | undefined;
|
|
44
47
|
/**
|
|
45
48
|
* Rebuilds internal workspace and createGraph wiring. This is automatically called during initialization and whenever
|
|
46
49
|
* the name or description properties change, but can also be called manually if needed to refresh the agent's graph definition.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
3
3
|
import "@arcgis/core/portal/Portal.js";
|
|
4
|
+
import "@arcgis/core/request.js";
|
|
4
5
|
import { isGraphInterrupt as f } from "@langchain/langgraph/web";
|
|
5
|
-
import
|
|
6
|
+
import "@arcgis/toolkit/string";
|
|
7
|
+
import "../chunks/generateLayerDescriptions.js";
|
|
6
8
|
import "@langchain/core/messages";
|
|
7
9
|
import "@langchain/core/callbacks/dispatch/web";
|
|
10
|
+
import "@langchain/core/callbacks/base";
|
|
11
|
+
import { c as u } from "../chunks/aiFactory.js";
|
|
8
12
|
import { watch as w } from "@arcgis/core/core/reactiveUtils.js";
|
|
9
13
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
10
|
-
import "@arcgis/core/request.js";
|
|
11
14
|
import { ChatPromptTemplate as S } from "@langchain/core/prompts";
|
|
12
15
|
import { property as m, subclass as _ } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
13
16
|
import { createAgent as h } from "langchain";
|
|
@@ -112,7 +115,7 @@ let a = class extends v {
|
|
|
112
115
|
return await S.fromTemplate(this.prompt).format(r);
|
|
113
116
|
}
|
|
114
117
|
_getTools() {
|
|
115
|
-
return this.tools?.map((t) => t.getTool()) ?? [];
|
|
118
|
+
return this.tools?.map((t) => "getTool" in t ? t.getTool() : t) ?? [];
|
|
116
119
|
}
|
|
117
120
|
//#endregion
|
|
118
121
|
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { property as h, subclass as c } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { watch as l } from "@arcgis/core/core/reactiveUtils.js";
|
|
4
4
|
import { BaseAgent as m } from "./BaseAgent.js";
|
|
5
5
|
import { c as u } from "../chunks/graph.js";
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
(a = e[i]) && (t = (o ? a(r, s, t) : a(t)) || t);
|
|
6
|
+
var f = Object.defineProperty, w = Object.getOwnPropertyDescriptor, p = (e, r, s, o) => {
|
|
7
|
+
for (var t = o > 1 ? void 0 : o ? w(r, s) : r, a = e.length - 1, i; a >= 0; a--)
|
|
8
|
+
(i = e[a]) && (t = (o ? i(r, s, t) : i(t)) || t);
|
|
10
9
|
return o && t && f(r, s, t), t;
|
|
11
10
|
};
|
|
12
|
-
let
|
|
11
|
+
let n = class extends m {
|
|
13
12
|
//#region Lifecycle
|
|
14
13
|
constructor(e) {
|
|
15
14
|
super(e);
|
|
@@ -38,7 +37,7 @@ let p = class extends m {
|
|
|
38
37
|
this._set("createGraph", r);
|
|
39
38
|
else {
|
|
40
39
|
const s = this.id, o = {
|
|
41
|
-
[s]: async (
|
|
40
|
+
[s]: async (a, i) => await r().compile().invoke(a, i)
|
|
42
41
|
}, t = [{ from: s, decide: () => {
|
|
43
42
|
} }];
|
|
44
43
|
this._set(
|
|
@@ -53,18 +52,18 @@ let p = class extends m {
|
|
|
53
52
|
}
|
|
54
53
|
//#endregion
|
|
55
54
|
};
|
|
56
|
-
|
|
55
|
+
p([
|
|
57
56
|
h()
|
|
58
|
-
],
|
|
59
|
-
|
|
57
|
+
], n.prototype, "workflow", 2);
|
|
58
|
+
p([
|
|
60
59
|
h()
|
|
61
|
-
],
|
|
62
|
-
|
|
60
|
+
], n.prototype, "inputSchema", 2);
|
|
61
|
+
p([
|
|
63
62
|
h()
|
|
64
|
-
],
|
|
65
|
-
|
|
63
|
+
], n.prototype, "outputSchema", 2);
|
|
64
|
+
n = p([
|
|
66
65
|
c("WorkflowAgent")
|
|
67
|
-
],
|
|
66
|
+
], n);
|
|
68
67
|
export {
|
|
69
|
-
|
|
68
|
+
n as WorkflowAgent
|
|
70
69
|
};
|
|
@@ -9,15 +9,93 @@ import type { ParallelWorkflow, ParallelWorkflowConstructProperties } from "./wo
|
|
|
9
9
|
import type { RouterWorkflow, RouterWorkflowConstructProperties } from "./workflows/RouterWorkflow.js";
|
|
10
10
|
import type { SequentialWorkflow, SequentialWorkflowConstructProperties } from "./workflows/SequentialWorkflow.js";
|
|
11
11
|
import type { SwitchWorkflow, SwitchWorkflowConstructProperties } from "./workflows/SwitchWorkflow.js";
|
|
12
|
+
import type { RunnableConfig } from "@langchain/core/runnables";
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Creates a Zod schema from a plain object schema definition.
|
|
15
16
|
*
|
|
17
|
+
* Supports all schema field variants:
|
|
18
|
+
* - `string` (with optional `enum`)
|
|
19
|
+
* - `number`
|
|
20
|
+
* - `boolean`
|
|
21
|
+
* - `array` with primitive or nested item definitions
|
|
22
|
+
* - `object` with nested `fields`
|
|
23
|
+
*
|
|
16
24
|
* @param definition
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const primitiveSchema = await createSchema({
|
|
28
|
+
* name: { type: "string", description: "Search location name", required: true },
|
|
29
|
+
* radius: { type: "number", description: "Search radius in miles" },
|
|
30
|
+
* active: { type: "boolean", description: "Whether the search is enabled" },
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const nestedObjectSchema = await createSchema({
|
|
36
|
+
* query: { type: "string", description: "User search text", required: true },
|
|
37
|
+
* options: {
|
|
38
|
+
* type: "object",
|
|
39
|
+
* description: "Search options",
|
|
40
|
+
* required: true,
|
|
41
|
+
* fields: {
|
|
42
|
+
* center: {
|
|
43
|
+
* type: "object",
|
|
44
|
+
* description: "Map center point",
|
|
45
|
+
* fields: {
|
|
46
|
+
* latitude: { type: "number", description: "Center latitude", required: true },
|
|
47
|
+
* longitude: { type: "number", description: "Center longitude", required: true },
|
|
48
|
+
* },
|
|
49
|
+
* },
|
|
50
|
+
* categories: { type: "array", description: "Selected categories", itemType: "string" },
|
|
51
|
+
* },
|
|
52
|
+
* },
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const arrayOfObjectsSchema = await createSchema({
|
|
58
|
+
* constraints: {
|
|
59
|
+
* type: "array",
|
|
60
|
+
* description: "Constraint rules",
|
|
61
|
+
* itemType: {
|
|
62
|
+
* type: "object",
|
|
63
|
+
* description: "Single constraint rule",
|
|
64
|
+
* fields: {
|
|
65
|
+
* key: { type: "string", description: "Constraint key", required: true },
|
|
66
|
+
* enabled: { type: "boolean", description: "Whether this rule is active" },
|
|
67
|
+
* values: { type: "array", description: "Rule values", itemType: "string" },
|
|
68
|
+
* },
|
|
69
|
+
* },
|
|
70
|
+
* },
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
17
73
|
* @since 5.1
|
|
18
74
|
*/
|
|
19
75
|
export function createSchema<const TDefinition extends SchemaDefinition>(definition: TDefinition): Promise<ZodObjectSchema<SchemaDefinitionData<TDefinition>>>;
|
|
20
76
|
|
|
77
|
+
/**
|
|
78
|
+
* The suggestions emitted by the agent to the user interface.
|
|
79
|
+
*
|
|
80
|
+
* @since 5.1
|
|
81
|
+
*/
|
|
82
|
+
export type UXSuggestion = {
|
|
83
|
+
/** The type of suggestion being made. */
|
|
84
|
+
type: string;
|
|
85
|
+
/** Optional additional data associated with the suggestion. */
|
|
86
|
+
data?: Record<string, unknown>;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Sends an optional UX suggestion from an agent run to the host application.
|
|
91
|
+
* Use this for non-blocking hints (for example, recommended next actions or UI prompts) that the app may choose to display.
|
|
92
|
+
*
|
|
93
|
+
* @param suggestion
|
|
94
|
+
* @param config
|
|
95
|
+
* @since 5.1
|
|
96
|
+
*/
|
|
97
|
+
export function sendUXSuggestion(suggestion: UXSuggestion, config?: RunnableConfig): Promise<void>;
|
|
98
|
+
|
|
21
99
|
/**
|
|
22
100
|
* Creates a FunctionAgent instance from the existing agent implementation.
|
|
23
101
|
*
|
|
@@ -1,148 +1,167 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
let
|
|
3
|
-
async function n(
|
|
4
|
-
if (
|
|
5
|
-
return
|
|
6
|
-
if ("default" in
|
|
7
|
-
const
|
|
8
|
-
return typeof
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
let i, a, c, u, l, s, w, m, f, p, d, g;
|
|
3
|
+
async function n(e, t) {
|
|
4
|
+
if (t in e)
|
|
5
|
+
return e[t];
|
|
6
|
+
if ("default" in e) {
|
|
7
|
+
const o = await e.default;
|
|
8
|
+
return typeof o == "object" && o !== null && t in o ? o[t] : o;
|
|
9
9
|
}
|
|
10
|
-
throw new Error(`Unable to resolve ${String(
|
|
10
|
+
throw new Error(`Unable to resolve ${String(t)} from module.`);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
for (const [
|
|
15
|
-
|
|
16
|
-
return
|
|
12
|
+
function y(e, t) {
|
|
13
|
+
const o = {};
|
|
14
|
+
for (const [r, k] of Object.entries(t))
|
|
15
|
+
o[r] = S(e, k);
|
|
16
|
+
return o;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function W(e, t) {
|
|
19
|
+
return e.object(y(e, t));
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
return
|
|
21
|
+
function S(e, t) {
|
|
22
|
+
const o = h(e, t);
|
|
23
|
+
return t.required === !0 ? o : o.optional();
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
return
|
|
25
|
+
function h(e, t) {
|
|
26
|
+
let o = P(e, t);
|
|
27
|
+
return t.description !== void 0 && (o = o.describe(t.description)), o;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
switch (
|
|
29
|
+
function b(e, t) {
|
|
30
|
+
switch (t) {
|
|
31
31
|
case "string":
|
|
32
|
-
return
|
|
32
|
+
return e.string();
|
|
33
33
|
case "number":
|
|
34
|
-
return
|
|
34
|
+
return e.number();
|
|
35
35
|
case "boolean":
|
|
36
|
-
return
|
|
36
|
+
return e.boolean();
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
39
|
+
function M(e) {
|
|
40
|
+
return e === "string" || e === "number" || e === "boolean";
|
|
41
|
+
}
|
|
42
|
+
function P(e, t) {
|
|
43
|
+
switch (t.type) {
|
|
41
44
|
case "string": {
|
|
42
|
-
if (
|
|
43
|
-
if (
|
|
45
|
+
if (t.enum != null) {
|
|
46
|
+
if (t.enum.length === 0)
|
|
44
47
|
throw new Error("String schema field enum must include at least one value.");
|
|
45
|
-
return
|
|
48
|
+
return e.enum(t.enum);
|
|
46
49
|
}
|
|
47
|
-
return
|
|
50
|
+
return e.string();
|
|
48
51
|
}
|
|
49
52
|
case "number":
|
|
50
|
-
return
|
|
53
|
+
return e.number();
|
|
51
54
|
case "boolean":
|
|
52
|
-
return
|
|
55
|
+
return e.boolean();
|
|
53
56
|
case "array": {
|
|
54
|
-
if (
|
|
57
|
+
if (t.itemType == null)
|
|
55
58
|
throw new Error("Array schema field requires an itemType definition.");
|
|
56
|
-
return
|
|
59
|
+
return e.array(
|
|
60
|
+
M(t.itemType) ? b(e, t.itemType) : h(e, t.itemType)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
case "object": {
|
|
64
|
+
if (t.fields == null)
|
|
65
|
+
throw new Error("Object schema field requires a fields definition.");
|
|
66
|
+
return W(e, t.fields);
|
|
57
67
|
}
|
|
58
68
|
}
|
|
59
69
|
}
|
|
60
|
-
async function
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
}
|
|
65
|
-
async function
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
70
|
+
async function A(e) {
|
|
71
|
+
d ??= import("zod");
|
|
72
|
+
const t = await d;
|
|
73
|
+
return W(t.z, e);
|
|
74
|
+
}
|
|
75
|
+
async function T(e, t) {
|
|
76
|
+
g ??= import("../utils/index.js");
|
|
77
|
+
const o = await g;
|
|
78
|
+
return await (await n(
|
|
79
|
+
o,
|
|
80
|
+
"sendUXSuggestion"
|
|
81
|
+
))(e, t);
|
|
82
|
+
}
|
|
83
|
+
async function L(e) {
|
|
84
|
+
i ??= import("./FunctionAgent.js");
|
|
85
|
+
const t = await i, o = await n(
|
|
86
|
+
t,
|
|
69
87
|
"FunctionAgent"
|
|
70
88
|
);
|
|
71
|
-
return new
|
|
89
|
+
return new o(e);
|
|
72
90
|
}
|
|
73
|
-
async function
|
|
91
|
+
async function q(e) {
|
|
74
92
|
a ??= import("./tools/FunctionTool.js");
|
|
75
|
-
const
|
|
76
|
-
|
|
93
|
+
const t = await a, o = await n(
|
|
94
|
+
t,
|
|
77
95
|
"FunctionTool"
|
|
78
96
|
);
|
|
79
|
-
return new
|
|
97
|
+
return new o(e);
|
|
80
98
|
}
|
|
81
|
-
async function
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
return new
|
|
99
|
+
async function F(e) {
|
|
100
|
+
c ??= import("./LLMAgent.js");
|
|
101
|
+
const t = await c, o = await n(t, "LLMAgent");
|
|
102
|
+
return new o(e);
|
|
85
103
|
}
|
|
86
|
-
async function
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
104
|
+
async function j(e) {
|
|
105
|
+
u ??= import("./WorkflowAgent.js");
|
|
106
|
+
const t = await u, o = await n(
|
|
107
|
+
t,
|
|
90
108
|
"WorkflowAgent"
|
|
91
109
|
);
|
|
92
|
-
return new
|
|
110
|
+
return new o(e);
|
|
93
111
|
}
|
|
94
|
-
async function
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
return new
|
|
112
|
+
async function E(e) {
|
|
113
|
+
l ??= import("./workflows/ConditionalWorkflow.js");
|
|
114
|
+
const t = await l, o = await n(t, "ConditionalWorkflow");
|
|
115
|
+
return new o(e);
|
|
98
116
|
}
|
|
99
|
-
async function
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|
|
117
|
+
async function v(e) {
|
|
118
|
+
s ??= import("./workflows/LoopWorkflow.js");
|
|
119
|
+
const t = await s, o = await n(
|
|
120
|
+
t,
|
|
103
121
|
"LoopWorkflow"
|
|
104
122
|
);
|
|
105
|
-
return new
|
|
123
|
+
return new o(e);
|
|
106
124
|
}
|
|
107
|
-
async function
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
|
|
125
|
+
async function U(e) {
|
|
126
|
+
w ??= import("./workflows/ParallelWorkflow.js");
|
|
127
|
+
const t = await w, o = await n(
|
|
128
|
+
t,
|
|
111
129
|
"ParallelWorkflow"
|
|
112
130
|
);
|
|
113
|
-
return new
|
|
131
|
+
return new o(e);
|
|
114
132
|
}
|
|
115
|
-
async function
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
|
|
133
|
+
async function R(e) {
|
|
134
|
+
m ??= import("./workflows/RouterWorkflow.js");
|
|
135
|
+
const t = await m, o = await n(
|
|
136
|
+
t,
|
|
119
137
|
"RouterWorkflow"
|
|
120
138
|
);
|
|
121
|
-
return new
|
|
139
|
+
return new o(e);
|
|
122
140
|
}
|
|
123
|
-
async function
|
|
141
|
+
async function X(e) {
|
|
124
142
|
f ??= import("./workflows/SequentialWorkflow.js");
|
|
125
|
-
const
|
|
126
|
-
return new
|
|
143
|
+
const t = await f, o = await n(t, "SequentialWorkflow");
|
|
144
|
+
return new o(e);
|
|
127
145
|
}
|
|
128
|
-
async function
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
|
|
146
|
+
async function x(e) {
|
|
147
|
+
p ??= import("./workflows/SwitchWorkflow.js");
|
|
148
|
+
const t = await p, o = await n(
|
|
149
|
+
t,
|
|
132
150
|
"SwitchWorkflow"
|
|
133
151
|
);
|
|
134
|
-
return new
|
|
152
|
+
return new o(e);
|
|
135
153
|
}
|
|
136
154
|
export {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
155
|
+
E as createConditionalWorkflow,
|
|
156
|
+
L as createFunctionAgent,
|
|
157
|
+
q as createFunctionTool,
|
|
158
|
+
F as createLLMAgent,
|
|
159
|
+
v as createLoopWorkflow,
|
|
160
|
+
U as createParallelWorkflow,
|
|
161
|
+
R as createRouterWorkflow,
|
|
162
|
+
A as createSchema,
|
|
163
|
+
X as createSequentialWorkflow,
|
|
164
|
+
x as createSwitchWorkflow,
|
|
165
|
+
j as createWorkflowAgent,
|
|
166
|
+
T as sendUXSuggestion
|
|
148
167
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { NodeInterrupt as s } from "@langchain/langgraph/web";
|
|
3
3
|
import { createAgentMiddleware as f, createToolMiddleware as I } from "./middleware.js";
|
|
4
4
|
const m = "human-in-the-loop", w = "Agent execution requires approval", p = "Agent execution rejected by the user.", h = "human-in-the-loop-tool", y = "Tool execution requires approval";
|
|
@@ -10,6 +10,7 @@ import type { AgentData } from "../types.js";
|
|
|
10
10
|
* executions, which can be useful for debugging and monitoring the agent's behavior.
|
|
11
11
|
*
|
|
12
12
|
* @returns An agent middleware that wraps model calls and sends trace messages.
|
|
13
|
+
* @internal
|
|
13
14
|
* @since 5.1
|
|
14
15
|
*/
|
|
15
16
|
export function createAgentTraceMiddleware(): AgentMiddleware;
|
|
@@ -20,6 +21,7 @@ export function createAgentTraceMiddleware(): AgentMiddleware;
|
|
|
20
21
|
* debugging and monitoring the behavior of tools within the agent's execution.
|
|
21
22
|
*
|
|
22
23
|
* @returns A function tool middleware that wraps tool calls and sends trace messages.
|
|
24
|
+
* @internal
|
|
23
25
|
* @since 5.1
|
|
24
26
|
*/
|
|
25
27
|
export function createToolTraceMiddleware<TInput extends AgentData = AgentData, TOutput = unknown>(): FunctionToolMiddleware<TInput, TOutput>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { s as r } from "../../chunks/index.js";
|
|
3
3
|
import { AIMessage as i, ToolMessage as s } from "@langchain/core/messages";
|
|
4
4
|
import { createAgentMiddleware as c, createToolMiddleware as d } from "./middleware.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import c from "@arcgis/core/core/Accessor.js";
|
|
3
3
|
import { property as a, subclass as p } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
4
4
|
import { tool as d } from "@langchain/core/tools";
|
|
@@ -3,10 +3,8 @@ import type { BaseChannel, BinaryOperatorAggregate } from "@langchain/langgraph/
|
|
|
3
3
|
import type { AnnotationRoot, StateDefinitionInit, StateGraph } from "@langchain/langgraph/web";
|
|
4
4
|
import type { AgentExecutionContext, AgentRegistration, AgentStatus } from "../utils/index.js";
|
|
5
5
|
|
|
6
|
-
/** @internal */
|
|
7
6
|
export type AgentData = Record<string, unknown>;
|
|
8
7
|
|
|
9
|
-
/** @internal */
|
|
10
8
|
export type EmptyAgentData = Record<never, never>;
|
|
11
9
|
|
|
12
10
|
/** @internal */
|
|
@@ -16,13 +14,18 @@ export type ZodModule = {
|
|
|
16
14
|
|
|
17
15
|
export type SchemaPrimitiveFieldType = "boolean" | "number" | "string";
|
|
18
16
|
|
|
17
|
+
export type SchemaArrayItemDefinition = SchemaFieldDefinition | SchemaPrimitiveFieldType;
|
|
18
|
+
|
|
19
19
|
export type SchemaFieldDefinition = ({
|
|
20
|
-
enum?: readonly string[];
|
|
21
|
-
type: "string";
|
|
22
|
-
} | {
|
|
23
|
-
itemType: SchemaPrimitiveFieldType;
|
|
24
20
|
type: "array";
|
|
25
|
-
|
|
21
|
+
itemType: SchemaArrayItemDefinition;
|
|
22
|
+
} | { type: "boolean" | "number"; } | {
|
|
23
|
+
type: "object";
|
|
24
|
+
fields: SchemaDefinition;
|
|
25
|
+
} | {
|
|
26
|
+
type: "string";
|
|
27
|
+
enum?: readonly string[];
|
|
28
|
+
}) & {
|
|
26
29
|
description?: string;
|
|
27
30
|
required?: boolean;
|
|
28
31
|
};
|
|
@@ -36,7 +39,7 @@ export type SchemaDefinitionData<TDefinition extends SchemaDefinition> = {
|
|
|
36
39
|
[K in keyof TDefinition as TDefinition[K] extends { required: true; } ? never : K]?: SchemaFieldData<TDefinition[K]>;
|
|
37
40
|
};
|
|
38
41
|
|
|
39
|
-
/** @privateRemark All
|
|
42
|
+
/** @privateRemark All agents are orchestrator-driven, so these channels exist for every agent graph. */
|
|
40
43
|
export type AgentRuntimeState = {
|
|
41
44
|
agentExecutionContext: AgentExecutionContext;
|
|
42
45
|
/** The outputMessage is a string representing the output of an agent execution. */
|
|
@@ -128,7 +131,6 @@ export type AgentNodeUpdate<TInput extends AgentData, TOutput extends AgentData>
|
|
|
128
131
|
* AgentStateAnnotation defines the shape of the agent state used in LangGraph nodes, including both the built-in runtime channels
|
|
129
132
|
* and any custom fields defined by the agent.
|
|
130
133
|
*
|
|
131
|
-
* @internal
|
|
132
134
|
* @since 5.1
|
|
133
135
|
*/
|
|
134
136
|
export type AgentStateAnnotation<TState extends AgentData> = AnnotationRoot<{
|
|
@@ -150,7 +152,6 @@ export type RunnableUpdate<TState extends AgentData> = Partial<TState> extends o
|
|
|
150
152
|
/**
|
|
151
153
|
* Internal type representing the compiled graph used for agent execution.
|
|
152
154
|
*
|
|
153
|
-
* @internal
|
|
154
155
|
* @since 5.1
|
|
155
156
|
*/
|
|
156
157
|
export type TypedStateGraph<TState extends AgentData> = StateGraph<StateDefinitionInit, AgentGraphState<TState>, RunnableUpdate<AgentGraphState<TState>>, string>;
|
|
@@ -159,7 +160,6 @@ export type TypedStateGraph<TState extends AgentData> = StateGraph<StateDefiniti
|
|
|
159
160
|
* The shape of the `createGraph` function used by agents to generate their internal graph representation.
|
|
160
161
|
* This function is responsible for defining the nodes and edges of the graph, as well as any associated state and middleware.
|
|
161
162
|
*
|
|
162
|
-
* @internal
|
|
163
163
|
* @since 5.1
|
|
164
164
|
*/
|
|
165
165
|
export type AgentCreateGraph<TState extends AgentData> = () => TypedStateGraph<TState>;
|
|
@@ -168,7 +168,7 @@ export type AgentCreateGraph<TState extends AgentData> = () => TypedStateGraph<T
|
|
|
168
168
|
export type ZodObjectSchema<T extends object = AgentData> = Pick<z.ZodType<T>, "safeParse">
|
|
169
169
|
& z.ZodObject;
|
|
170
170
|
|
|
171
|
-
export type GraphNodes<S extends AgentData
|
|
171
|
+
export type GraphNodes<S extends AgentData, TUpdate = Partial<S>> = Record<string, (state: S, config?: AgentExecutionConfig) => Promise<S | TUpdate> | S | TUpdate>;
|
|
172
172
|
|
|
173
173
|
export type GraphEdge<S extends AgentData> = {
|
|
174
174
|
from: string;
|
|
@@ -178,4 +178,4 @@ export type GraphEdge<S extends AgentData> = {
|
|
|
178
178
|
to: string;
|
|
179
179
|
};
|
|
180
180
|
|
|
181
|
-
export type SchemaFieldData<TField extends SchemaFieldDefinition> = TField extends { type: "string"; } ? TField["enum"] extends readonly (infer TValue extends string)[] ? TValue : string : TField extends { type: "array"; } ? (TField["itemType"] extends "string" ? string : TField["itemType"] extends "number" ? number : boolean)[] : TField extends { type: "number"; } ? number : boolean;
|
|
181
|
+
export type SchemaFieldData<TField extends SchemaFieldDefinition> = TField extends { type: "string"; } ? TField["enum"] extends readonly (infer TValue extends string)[] ? TValue : string : TField extends { type: "array"; } ? (TField["itemType"] extends "string" ? string : TField["itemType"] extends "number" ? number : TField["itemType"] extends "boolean" ? boolean : TField["itemType"] extends SchemaFieldDefinition ? SchemaFieldData<TField["itemType"]> : never)[] : TField extends { type: "object"; } ? SchemaDefinitionData<TField["fields"]> : TField extends { type: "number"; } ? number : boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { property as u, subclass as f } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { B as p, g as c } from "../../chunks/BaseWorkflow.js";
|
|
4
4
|
var g = Object.defineProperty, w = Object.getOwnPropertyDescriptor, a = (e, r, n, t) => {
|