@arcgis/ai-components 6.0.0-next.1 → 6.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-utils/BaseAgent.js +1 -1
- package/dist/agent-utils/FunctionAgent.js +1 -1
- package/dist/agent-utils/LLMAgent.js +1 -1
- package/dist/agent-utils/SkillAgent.js +1 -1
- package/dist/agent-utils/WorkflowAgent.js +1 -1
- package/dist/agent-utils/createSchema.js +1 -1
- package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/agent-utils/middlewares/middleware.js +1 -1
- package/dist/agent-utils/middlewares/trace.js +1 -1
- package/dist/agent-utils/middlewares/types.js +1 -1
- package/dist/agent-utils/tools/FunctionTool.js +1 -1
- package/dist/agent-utils/tools/MCPToolProvider.js +1 -1
- package/dist/agent-utils/tools/WebMCPToolProvider.js +1 -1
- package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
- package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
- package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
- package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
- package/dist/agents/agents/arcgisKnowledge/graph/arcgisKnowledgeGraph.js +1 -1
- package/dist/agents/agents/dataExploration/dataExplorationAgent.js +1 -1
- package/dist/agents/agents/dataExplorationGraph/graph/dataExplorationGraph.js +1 -1
- package/dist/agents/agents/help/helpAgent.js +1 -1
- package/dist/agents/agents/helpGraph/graph/helpGraph.js +1 -1
- package/dist/agents/agents/layerStyling/context/layerStylingContext.js +1 -1
- package/dist/agents/agents/layerStyling/graph/layerStylingGraph.js +1 -1
- package/dist/agents/agents/navigation/navigationAgent.js +1 -1
- package/dist/agents/agents/navigationGraph/graph/navigationGraph.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/24KEZCPF.js +2 -0
- package/dist/cdn/{2UKFCF2J.js → 272R36XK.js} +2 -2
- package/dist/cdn/{FX4LV2S3.js → 2H32MDP2.js} +1 -1
- package/dist/cdn/{VAXH6RUQ.js → 2HNGMLFD.js} +2 -2
- package/dist/cdn/{24TK55FP.js → 2JD3G7IW.js} +2 -2
- package/dist/cdn/{P4CHI7W3.js → 2NOLMOEP.js} +2 -2
- package/dist/cdn/{ZU2FHVNK.js → 2OW3DCUT.js} +2 -2
- package/dist/cdn/2PGZDONH.js +2 -0
- package/dist/cdn/2WY5MPMY.js +2 -0
- package/dist/cdn/{2DWN3SKH.js → 3COVQI26.js} +2 -2
- package/dist/cdn/{VIJVRJHL.js → 3UVQLYUK.js} +2 -2
- package/dist/cdn/{BIEX4MVV.js → 5HNKH5OK.js} +2 -2
- package/dist/cdn/{46DT6BIG.js → 5INBG23U.js} +1 -1
- package/dist/cdn/{YJXRCO4T.js → 5LBUP33F.js} +2 -2
- package/dist/cdn/{UZLQALHY.js → 5PV2GUZW.js} +1 -1
- package/dist/cdn/{YBWRFVA6.js → 5SRRG7WG.js} +2 -2
- package/dist/cdn/{EEHDAYOG.js → 5XZ5VL42.js} +2 -2
- package/dist/cdn/{DI3VGUJY.js → 63OF33IL.js} +2 -2
- package/dist/cdn/{NHWT7CXX.js → 6ELWX4W5.js} +2 -2
- package/dist/cdn/{OKVLGJAG.js → 6J3J7VLW.js} +2 -2
- package/dist/cdn/{AOVJ34QE.js → 6QOSUG64.js} +2 -2
- package/dist/cdn/{GVFJHADC.js → 6UGT2UG5.js} +2 -2
- package/dist/cdn/{JEWJ4M25.js → 7APXFHDF.js} +3 -3
- package/dist/cdn/{QEGO4B2W.js → 7GDMXAF5.js} +2 -2
- package/dist/cdn/7JIXXYZR.js +2 -0
- package/dist/cdn/{X5ET73QZ.js → 7OQK2F7O.js} +2 -2
- package/dist/cdn/{KX6CZEVZ.js → 7XVIZ7HK.js} +2 -2
- package/dist/cdn/{FSLPYC4Y.js → A4ZVCRVF.js} +2 -2
- package/dist/cdn/{OVIQ5NSE.js → AGDGDULE.js} +2 -2
- package/dist/cdn/{TPULIO6I.js → AMA67DVI.js} +2 -2
- package/dist/cdn/AO42IPOX.js +2 -0
- package/dist/cdn/{UOKYHQNO.js → AOT3PM2Q.js} +2 -2
- package/dist/cdn/{EG5BMYZO.js → AQ7KG25Q.js} +2 -2
- package/dist/cdn/{6PK2UPG3.js → AWH4VDPD.js} +2 -2
- package/dist/cdn/AY2ZONWQ.js +2 -0
- package/dist/cdn/{JZPPP4QY.js → BMVPOFHU.js} +2 -2
- package/dist/cdn/BWUQRZPK.js +2 -0
- package/dist/cdn/{XWNZMKQF.js → C3VLDYS2.js} +2 -2
- package/dist/cdn/{PQ2DPOFM.js → C5Q6E7UC.js} +2 -2
- package/dist/cdn/{FDOMMK2M.js → CETIZ4IQ.js} +1 -1
- package/dist/cdn/{TENUVOFJ.js → COANVCKH.js} +2 -2
- package/dist/cdn/{2O52MJ3D.js → D7CRICBG.js} +2 -2
- package/dist/cdn/D7FEOAW3.js +2 -0
- package/dist/cdn/{PGUEODFA.js → DY6MO2CA.js} +2 -2
- package/dist/cdn/EKMCGN6R.js +2 -0
- package/dist/cdn/EUIURCPS.js +2 -0
- package/dist/cdn/{DGCWQYN3.js → FGQH46Z2.js} +2 -2
- package/dist/cdn/FIZMK7GS.js +1 -0
- package/dist/cdn/FONIQ7VF.js +2 -0
- package/dist/cdn/G3KILEGJ.js +2 -0
- package/dist/cdn/{FYZATVB3.js → G7MCIFV2.js} +2 -2
- package/dist/cdn/{SDWWUWAF.js → GGAXXX5X.js} +2 -2
- package/dist/cdn/GS5JDPZH.js +2 -0
- package/dist/cdn/{T3SCINN5.js → H4QWVTEZ.js} +2 -2
- package/dist/cdn/{ZSLHB6MF.js → H6J65TWL.js} +2 -2
- package/dist/cdn/{UHEYPSOR.js → HCPI2RJE.js} +2 -2
- package/dist/cdn/{PCAMBPOA.js → HJOWCZPL.js} +2 -2
- package/dist/cdn/{7HVIVV3O.js → HOMSK66Q.js} +2 -2
- package/dist/cdn/{5REENYPV.js → HTNKDDEV.js} +2 -2
- package/dist/cdn/{6WYVG3JI.js → HU527DML.js} +2 -2
- package/dist/cdn/I37ZJHTM.js +2 -0
- package/dist/cdn/{GHFOAS7T.js → I724KIFI.js} +2 -2
- package/dist/cdn/IH5P2PWJ.js +2 -0
- package/dist/cdn/{C67KQCPS.js → J3T5HB77.js} +2 -2
- package/dist/cdn/{EXLDRGUC.js → JCWFLYB4.js} +2 -2
- package/dist/cdn/{IHP25JWI.js → JSRNLNOE.js} +2 -2
- package/dist/cdn/{MPWEXYYB.js → KDA5VPLO.js} +2 -2
- package/dist/cdn/KRPPMEOF.js +2 -0
- package/dist/cdn/{GBFRJF4F.js → KURNYULZ.js} +2 -2
- package/dist/cdn/{ZKWXHSEQ.js → L46O52F7.js} +2 -2
- package/dist/cdn/{BBB5EJUB.js → L5OYOLWV.js} +3 -3
- package/dist/cdn/{FJV7CI7O.js → LDDP7NSY.js} +2 -2
- package/dist/cdn/{ZQTCPJUV.js → LGIXZLOP.js} +2 -2
- package/dist/cdn/{OGZFST2A.js → LMAIOLS2.js} +2 -2
- package/dist/cdn/{CFAC4FN3.js → LWEKPFV6.js} +2 -2
- package/dist/cdn/{L5IPMRHC.js → M52LKZN7.js} +2 -2
- package/dist/cdn/{AQF6BBWC.js → M5UMOOL2.js} +2 -2
- package/dist/cdn/{HWIM4KWF.js → MHXM37QI.js} +2 -2
- package/dist/cdn/{7X22QXJP.js → MR3R5YHQ.js} +2 -2
- package/dist/cdn/{M6JQGHCE.js → MUSLUFKI.js} +2 -2
- package/dist/cdn/MYLY2ABI.js +2 -0
- package/dist/cdn/{AMP43OT2.js → N2GN5WOI.js} +2 -2
- package/dist/cdn/{RE7MJTEF.js → NAVK5JJ2.js} +3 -3
- package/dist/cdn/NDSYDURO.js +2 -0
- package/dist/cdn/{7ZTYHZIN.js → NK2QRPS6.js} +2 -2
- package/dist/cdn/{GMZUN5SF.js → NYFL2F5L.js} +2 -2
- package/dist/cdn/{PGH7POKS.js → OKDXM5D4.js} +2 -2
- package/dist/cdn/{JFL5IWPK.js → OMUWBY75.js} +2 -2
- package/dist/cdn/{34O57OGV.js → OPQCY33W.js} +1 -1
- package/dist/cdn/{R74ZHFA6.js → OUMTV5H5.js} +1 -1
- package/dist/cdn/{5FDBJI24.js → OZDRETY2.js} +2 -2
- package/dist/cdn/{DYSPEU7W.js → PR4VMSKD.js} +1 -1
- package/dist/cdn/{HSMAXOOA.js → PXBS2FXE.js} +2 -2
- package/dist/cdn/{DJG6DBCU.js → Q7BJGEFH.js} +3 -3
- package/dist/cdn/{XEJFVUNQ.js → QAVDW7A7.js} +1 -1
- package/dist/cdn/{ONQ6JSBJ.js → QBZP6XOE.js} +1 -1
- package/dist/cdn/{OT5ECP4V.js → RFIN7KO6.js} +2 -2
- package/dist/cdn/RNJ7T5GF.js +2 -0
- package/dist/cdn/{BMPBJXD7.js → S6OUM5X2.js} +2 -2
- package/dist/cdn/SG6PAUVR.js +2 -0
- package/dist/cdn/{7MCFHVEH.js → SRXUC4QB.js} +2 -2
- package/dist/cdn/{A22375P3.js → SUMXIUIS.js} +2 -2
- package/dist/cdn/SW3D6QD4.js +2 -0
- package/dist/cdn/{GEFFWUB2.js → T2OYUOSO.js} +1 -1
- package/dist/cdn/T7LYQ56H.js +2 -0
- package/dist/cdn/{DZOQFEOB.js → TFXK2POV.js} +2 -2
- package/dist/cdn/{XQ3NBBQ3.js → TIQUULA4.js} +1 -1
- package/dist/cdn/{LCI5MEDN.js → TOUYGIGK.js} +2 -2
- package/dist/cdn/{RFDMNYTA.js → UJMM5QA4.js} +2 -2
- package/dist/cdn/{5LA77ZBW.js → UMTRLI63.js} +2 -2
- package/dist/cdn/{NPV4MEAZ.js → UP7RW5K2.js} +2 -2
- package/dist/cdn/{XCLICBG7.js → UR2S7L6Z.js} +2 -2
- package/dist/cdn/{CEKOEHB3.js → UWHRBGWN.js} +2 -2
- package/dist/cdn/{UQRBY7ID.js → UXDRYDOD.js} +2 -2
- package/dist/cdn/{JUPTVXLY.js → UZ7XFHYI.js} +2 -2
- package/dist/cdn/V66TS2BB.js +2 -0
- package/dist/cdn/{AAUVOBPS.js → VINKTQFR.js} +1 -1
- package/dist/cdn/{SWXUQFB6.js → VU7IOGNS.js} +2 -2
- package/dist/cdn/{HC5DJL2U.js → W2SIOY2B.js} +2 -2
- package/dist/cdn/{FBARYPZ7.js → W36IUEUB.js} +2 -2
- package/dist/cdn/{5TW2NFES.js → WEBAQIUT.js} +2 -2
- package/dist/cdn/{WSIZ2OTL.js → WHIWOYHN.js} +1 -1
- package/dist/cdn/WOL5YMJ2.js +2 -0
- package/dist/cdn/{66VWTARH.js → X3YFCWQZ.js} +2 -2
- package/dist/cdn/{ICBIUFK7.js → X4EQEKM7.js} +2 -2
- package/dist/cdn/{TJBU5BQK.js → XBWGOD6I.js} +2 -2
- package/dist/cdn/{6E6T6U7W.js → XGDXTTYW.js} +2 -2
- package/dist/cdn/{CDS2HGQY.js → XLHYQNAM.js} +2 -2
- package/dist/cdn/{NEV6OZN3.js → XMQJWPXI.js} +2 -2
- package/dist/cdn/{QT3B5K4R.js → XQUKC4YK.js} +2 -2
- package/dist/cdn/{JEBRN3EU.js → XSH4B7FP.js} +2 -2
- package/dist/cdn/{LK7ZIQW6.js → XVWSIDZV.js} +2 -2
- package/dist/cdn/{J6A4AS7E.js → XYMIFFBW.js} +2 -2
- package/dist/cdn/{MPQ2OZXN.js → Y3ZKMD47.js} +2 -2
- package/dist/cdn/{YPLPDUMB.js → YAANCUW2.js} +2 -2
- package/dist/cdn/{KY7M4WHO.js → YD5LVM7V.js} +2 -2
- package/dist/cdn/{AMURN3LO.js → YGI277SH.js} +2 -2
- package/dist/cdn/{YI6NIHNI.js → YGSDJ4V3.js} +2 -2
- package/dist/cdn/YJEARDAZ.js +2 -0
- package/dist/cdn/{XC3T3Z5R.js → YSEHJQ4L.js} +2 -2
- package/dist/cdn/Z44NI2YQ.js +2 -0
- package/dist/cdn/{74CVYM72.js → ZEDDYT24.js} +2 -2
- package/dist/cdn/{MD2FTKQT.js → ZROI63CW.js} +2 -2
- package/dist/cdn/{UYP5PH5E.js → ZUKM4DGB.js} +2 -2
- package/dist/cdn/ZVVNATCX.js +2 -0
- package/dist/cdn/agent-utils/BaseAgent.js +2 -2
- package/dist/cdn/agent-utils/FunctionAgent.js +2 -2
- package/dist/cdn/agent-utils/LLMAgent.js +2 -2
- package/dist/cdn/agent-utils/SkillAgent.js +2 -2
- package/dist/cdn/agent-utils/WorkflowAgent.js +2 -2
- package/dist/cdn/agent-utils/createSchema.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/agent-utils/tools/FunctionTool.js +2 -2
- package/dist/cdn/agent-utils/tools/MCPToolProvider.js +2 -2
- package/dist/cdn/agent-utils/tools/WebMCPToolProvider.js +2 -2
- package/dist/cdn/agent-utils/workflows/ConditionalWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/LoopWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/ParallelWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/RouterWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/SequentialWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/SwitchWorkflow.js +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/orchestrator/embeddings/getEmbeddings.js +2 -2
- package/dist/cdn/orchestrator/models/chatModel.js +2 -2
- package/dist/cdn/orchestrator/models/prompts.js +2 -2
- package/dist/cdn/orchestrator/signals.js +2 -2
- package/dist/cdn/orchestrator/state/runtime.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/adapter2.js +1 -1
- package/dist/chunks/aiFactory.js +1 -1
- package/dist/chunks/aiUtilityService.js +1 -1
- 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/converterUtils.js +1 -1
- package/dist/chunks/createSkillAgent.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/fetchUtils.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/getPrompt.js +1 -1
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpState.js +1 -1
- package/dist/chunks/help_prompt.js +1 -1
- package/dist/chunks/intent_prompt.js +1 -1
- package/dist/chunks/layerQueryToolCalling.js +1 -1
- package/dist/chunks/layerStylingState.js +1 -1
- package/dist/chunks/layer_descriptions_prompt.js +1 -1
- package/dist/chunks/layer_styling_prompt.js +1 -1
- package/dist/chunks/localization.js +1 -1
- package/dist/chunks/mergeWhereClauses.js +1 -1
- package/dist/chunks/modelConfig.js +1 -1
- package/dist/chunks/modelPricing.js +1 -1
- package/dist/chunks/navigationState.js +1 -1
- package/dist/chunks/navigation_intent_prompt.js +1 -1
- package/dist/chunks/navigation_tool_prompt.js +1 -1
- package/dist/chunks/observationSnapshot.js +1 -1
- package/dist/chunks/reducers.js +1 -1
- package/dist/chunks/requireAgentServices.js +1 -1
- package/dist/chunks/resolveFieldNames.js +1 -1
- package/dist/chunks/resolveGeometryFilter.js +1 -1
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/runtime2.js +1 -1
- package/dist/chunks/runtimeSpans.js +1 -1
- package/dist/chunks/schema.js +1 -1
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +1 -1
- package/dist/chunks/summarize_query_response_prompt.js +1 -1
- package/dist/chunks/textFormatters.js +1 -1
- package/dist/chunks/toolCallResponse.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/chunks/webmapSchema.js +1 -1
- package/dist/components/arcgis-assistant/customElement.js +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +1 -1
- 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-observation-inspector/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-latency/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-panel/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-run/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-usage/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/orchestrator/embeddings/cosineSimilarity.js +1 -1
- package/dist/orchestrator/embeddings/getEmbeddings.js +1 -1
- package/dist/orchestrator/embeddings/webmapEmbeddings.js +1 -1
- package/dist/orchestrator/models/chatModel.js +1 -1
- package/dist/orchestrator/models/prompts.js +1 -1
- package/dist/orchestrator/orchestrator/orchestrator.js +1 -1
- package/dist/orchestrator/orchestrator/orchestratorEvents.js +1 -1
- package/dist/orchestrator/signals.js +1 -1
- package/dist/orchestrator/state/runtime.js +1 -1
- package/dist/orchestrator/state/types.js +1 -1
- package/dist/orchestrator/types.js +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/2UDDCWNW.js +0 -2
- package/dist/cdn/434TAA3J.js +0 -2
- package/dist/cdn/4KFTUBFL.js +0 -2
- package/dist/cdn/AO2G4EXA.js +0 -2
- package/dist/cdn/AWPLRVPS.js +0 -2
- package/dist/cdn/C76HLPKU.js +0 -2
- package/dist/cdn/CADNOKIK.js +0 -2
- package/dist/cdn/CHHC6YNW.js +0 -2
- package/dist/cdn/DBRBT54R.js +0 -2
- package/dist/cdn/DJKEGIQZ.js +0 -2
- package/dist/cdn/EGSD465U.js +0 -2
- package/dist/cdn/HLWG7OIR.js +0 -2
- package/dist/cdn/KKWCHNYQ.js +0 -2
- package/dist/cdn/M2G44RTS.js +0 -2
- package/dist/cdn/MB7SEHPZ.js +0 -2
- package/dist/cdn/MC2V5WT3.js +0 -2
- package/dist/cdn/MZFWD5CQ.js +0 -2
- package/dist/cdn/NMFEXE4D.js +0 -2
- package/dist/cdn/OYHYHALE.js +0 -2
- package/dist/cdn/QUZTFUWM.js +0 -1
- package/dist/cdn/RF6HWZMB.js +0 -2
- package/dist/cdn/RFPTOFM4.js +0 -2
- package/dist/cdn/RKURZ5T2.js +0 -2
- package/dist/cdn/SJ4UMNIS.js +0 -2
- package/dist/cdn/USPB2QBX.js +0 -2
- package/dist/cdn/V6EX4YCY.js +0 -2
- package/dist/cdn/VA4M72JC.js +0 -2
- package/dist/cdn/VQ67NANV.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{f as o}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{f as o}from"./T2OYUOSO.js";import{a as $,c as f}from"./VINKTQFR.js";import{A as h,C as m,g as u,h as t,l as g,x as v}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var w=u`:host{display:block;min-width:0;min-height:0}calcite-panel{height:100%}calcite-tabs{position:relative;flex:1;height:0;min-height:0;overflow:hidden}.details{padding:var(--calcite-spacing-md)}.details>*+*{margin-block-start:var(--calcite-spacing-lg)}h3{margin:0 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-relative-base);font-weight:var(--calcite-font-weight-semibold)}.metadata calcite-table-header,.detail-value,.error{overflow-wrap:anywhere}calcite-table{font-variant-numeric:tabular-nums}.table-scroll{overflow-x:auto}.table-scroll calcite-table{min-width:30rem}.payload{margin:0;padding:var(--calcite-spacing-md);white-space:pre-wrap;overflow-wrap:anywhere;font-family:var(--calcite-monospace-family);font-size:var(--calcite-font-size-relative-sm);color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.empty{display:grid;min-height:5rem;place-items:center;color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm)}`;function y(i,e){if(i===void 0)return t`<div class="empty">${e} unavailable.</div>`;try{let a=typeof i=="string"?i:JSON.stringify(i,null,2);return a===void 0?t`<div class="empty">${e} cannot be serialized.</div>`:t`<pre class="payload">${a===""?'""':a}</pre>`}catch{return t`<div class="empty">${e} cannot be serialized.</div>`}}function s(i,e){let a=e.filter(l=>l.value!==void 0);return a.length?t`<section aria-label=${`${i} details`}><h3>${i}</h3><calcite-table class="metadata" .caption=${`${i} metadata`} aria-label=${`${i} metadata`} scale=s layout=fixed interaction-mode=static bordered><calcite-table-row slot=table-header><calcite-table-header heading=Field></calcite-table-header><calcite-table-header heading=Value col-span=2></calcite-table-header></calcite-table-row>${a.map(l=>t`<calcite-table-row><calcite-table-header .heading=${l.label}></calcite-table-header><calcite-table-cell col-span=2><span class="detail-value">${l.value}</span></calcite-table-cell></calcite-table-row>`)}</calcite-table></section>`:null}var d=class extends v{constructor(){super(...arguments),this.pricing=$}static{this.properties={span:0,run:0,pricing:0}}static{this.styles=w}async copy(){let e=this.span??this.run;if(e)try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(a){g("warn","assistant-observation-inspector","Failed to copy selected data as JSON",{once:!0,detail:{error:a}})}}renderRunDetails(e){return t`<div class="details">${s("Run",[{label:"Status",value:e.status},{label:"Duration",value:o(e)},{label:"Started",value:new Date(e.startedAt).toLocaleString()},{label:"Ended",value:e.endedAt!==void 0?new Date(e.endedAt).toLocaleString():void 0}])}${s("Model",[{label:"Models used",value:e.models.map(a=>a.model??"Not reported").join(", ")||"None"},{label:"Model calls",value:e.usage.modelCalls.toLocaleString()}])}<arcgis-assistant-observation-usage .usage=${e.usage} aggregate .pricing=${this.pricing}></arcgis-assistant-observation-usage><div class="table-scroll"><calcite-table caption="Usage by model" aria-label="Usage by model" scale=s interaction-mode=static bordered><calcite-table-row slot=table-header><calcite-table-header heading=Model></calcite-table-header><calcite-table-header heading=Calls></calcite-table-header><calcite-table-header heading="Input tokens"></calcite-table-header><calcite-table-header heading="Output tokens"></calcite-table-header><calcite-table-header heading="Estimated cost (USD)"></calcite-table-header></calcite-table-row>${e.models.map(({model:a,usage:l})=>t`<calcite-table-row><calcite-table-header .heading=${a??"Not reported"}></calcite-table-header><calcite-table-cell>${l.modelCalls.toLocaleString()}</calcite-table-cell><calcite-table-cell>${l.tokens.input?.toLocaleString()??"Not reported"}</calcite-table-cell><calcite-table-cell>${l.tokens.output?.toLocaleString()??"Not reported"}</calcite-table-cell><calcite-table-cell>${f(l.cost?.total)}</calcite-table-cell></calcite-table-row>`)}</calcite-table></div>${s("Identifiers",[{label:"Run ID",value:e.id}])}</div>`}renderSpanDetails(e){let a=e.metadata?.model,l=[{label:"Status",value:e.status},{label:"Type",value:e.type},{label:"Duration",value:e.durationMs!==void 0?o(e):void 0},{label:"Started",value:new Date(e.startedAt).toLocaleString()},{label:"Ended",value:e.endedAt!==void 0?new Date(e.endedAt).toLocaleString():void 0}],r=[];if(a||e.type==="model"){let c=e.pricingTier==="long-context"?"Long context":e.pricingTier==="standard"?"Standard":"Unavailable";r.push({label:"Model",value:a??"Not reported"},{label:"Pricing tier",value:c})}let n=[{label:"Run ID",value:e.runId},{label:"Span ID",value:e.id},{label:"Parent span",value:e.parentId||void 0},{label:"Agent",value:e.agentId||void 0}];return t`<div class="details">${s("Span",l)}${s("Model",r)}${e.usage?t`<arcgis-assistant-observation-usage .usage=${e.usage} .pricing=${this.pricing}></arcgis-assistant-observation-usage>`:null}${s("Identifiers",n)}</div>`}render(){let e=this.run,a=this.span,l=e?.spans.filter(p=>p.type==="workflow"&&!p.parentId).at(-1),r=a?a.input:e?e.prompt||l?.input:void 0,n=a?a.output:l?.output,c=a?.error,b=a?"Copy span JSON":"Copy run JSON";return t`<calcite-panel .heading=${a?a.label:e?`Run ${e.number}`:"Span details"} aria-label=${a||!e?"Span inspector":"Run inspector"} closable><calcite-action slot=header-actions-end icon=copy-to-clipboard .text=${b} title=${b??h} .disabled=${!e&&!a} @click=${this.copy}></calcite-action>${c?t`<calcite-notice role=alert slot=content-top open kind=danger icon scale=s width=full><div class="error" slot=message>${c.name?`${c.name}: `:""}${c.message}</div></calcite-notice>`:null}${e||a?t`<calcite-tabs><calcite-tab-nav slot=title-group><calcite-tab-title selected>Details</calcite-tab-title><calcite-tab-title>Input</calcite-tab-title><calcite-tab-title>Output</calcite-tab-title><calcite-tab-title>Latency</calcite-tab-title></calcite-tab-nav><calcite-tab selected>${a?this.renderSpanDetails(a):this.renderRunDetails(e)}</calcite-tab><calcite-tab>${y(r,"Input")}</calcite-tab><calcite-tab>${y(n,"Output")}</calcite-tab><calcite-tab><arcgis-assistant-observation-latency .run=${e} .span=${a}></arcgis-assistant-observation-latency></calcite-tab></calcite-tabs>`:t`<div class="empty">No span selected.</div>`}</calcite-panel>`}};m("arcgis-assistant-observation-inspector",d);export{d as ArcgisAssistantObservationInspector};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as P}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as P}from"./V66TS2BB.js";import{a as f}from"./GS5JDPZH.js";import{a as u}from"./2WY5MPMY.js";import{a as $,b as w,c as T}from"./S6OUM5X2.js";import{e as E}from"./XLHYQNAM.js";import{Ea as C,S as M,a as v,b,y as S}from"./7GDMXAF5.js";import{Ga as x}from"./A4ZVCRVF.js";import{N as d}from"./N2GN5WOI.js";import{V as A}from"./272R36XK.js";var m=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),K=["point","polyline","polygon","extent","custom"],Q=e=>typeof e=="string"&&K.some(a=>a===e),V=(e,a)=>{if(!(!m(e)||!("value"in e))){if(m(e.sharedStatePatch)){let o={...a.sharedStatePatch};for(let[t,r]of Object.entries(e.sharedStatePatch))m(r)&&"value"in r&&(o[t]={value:r.value});a.sharedStatePatch=o}if(Array.isArray(e.sharedResourceAdditions))for(let o of e.sharedResourceAdditions)m(o)&&Q(o.kind)&&typeof o.description=="string"&&"payload"in o&&a.sharedResourceAdditions.push({kind:o.kind,description:o.description,payload:o.payload})}},W=()=>{let e={sharedResourceAdditions:[]};return{middleware:w({name:"ToolArtifactMiddleware",afterAgent:a=>{if(delete e.sharedStatePatch,e.sharedResourceAdditions.length=0,!m(a))return;let o=a.messages;if(Array.isArray(o)){for(let t of o)if(A.isInstance(t)&&t.status!=="error"){let r=t.artifact;V(r,e)}}}}),collectedEffects:e}},X=async e=>{let{getLocaleFromConfig:a,getStrings:o}=await import("./T7LYQ56H.js"),t=await o({path:"./assets/agents/t9n",locale:a(e)});return w({name:"TraceMiddleware",wrapModelCall:async(r,s)=>{await u({text:t.determiningNextSteps},e);try{return await s(r)}catch(n){throw await u({text:t.failedCallingModel},e),n}},wrapToolCall:async(r,s)=>{await u({text:t.callingTool.replace("{toolName}",r.toolCall.name).replace("{toolArgs}",JSON.stringify(r.toolCall.args))},e);try{return await s(r)}catch(n){throw await u({text:t.failedExecutingTool.replace("{toolName}",r.toolCall.name)},e),n}}})},Y=(e,a)=>{let o=e.get(a);if(!o)throw new Error(`Skill not found: ${a}`);return o.instructions},Z=e=>{if(e.size===0)throw new Error("At least one skill is required.");let a=[...e.keys()];return x(({name:o})=>Y(e,o),{name:"load_skill",description:"Load the detailed instructions for an available skill.",schema:f.object({name:f.enum(a)})})},ee=e=>{let a=/^---\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(e)?.groups;if(!a?.name||!/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(a.name)||a.name.length>64||!a.description||a.description.length>1024||!a.instructions)throw new Error("Invalid skill Markdown.");return{allowedTools:a.allowedTools?.split(/\s+/u)??[],name:a.name,description:a.description,instructions:a.instructions.trim()}},te=async e=>{let a=await Promise.all(e.map(async t=>ee(await t()))),o=new Map;for(let t of a){if(o.has(t.name))throw new Error(`Skill name must be unique: ${t.name}`);o.set(t.name,t)}return o},R="load_skill",q=e=>typeof e=="object"&&e!==null&&"name"in e&&typeof e.name=="string"?e.name:void 0,ae=(e,a)=>{let o=a;return w({name:"ActiveSkillMiddleware",wrapModelCall:async(t,r)=>{let s=new Set([R,...o?.allowedTools??[]]);return await r({...t,tools:t.tools.filter(n=>{let l=q(n);return l!==void 0&&s.has(l)})})},wrapToolCall:async(t,r)=>{let s=await r(t);if(t.toolCall.name===R){let n=q(t.toolCall.args),l=n?e.get(n):void 0;l&&(o=l)}return s}})},oe=async(e,a={})=>{let o=new Set([...e.values()].flatMap(t=>t.allowedTools));return await Promise.all([...o].map(async t=>{let r=a[t],s=r?await r():await P(t);if(s.name!==t)throw new Error(`Skill tool "${t}" resolved to "${s.name}".`);return s}))},re=async(e,a={})=>{let o=await te(e),t=[...o.values()];if(t.length===0)throw new Error("createSkillRuntime requires at least one skill.");let r=await oe(o,a),s=t.length===1?t[0]:void 0;return{activeSkillMiddleware:ae(o,s),skillsPrompt:s?`Active skill:
|
|
3
3
|
${s.name}
|
|
4
4
|
|
|
5
5
|
${s.instructions}`:`Available skills:
|
|
6
6
|
${t.map(n=>`- ${n.name}: ${n.description}`).join(`
|
|
7
7
|
`)}
|
|
8
8
|
|
|
9
|
-
Call load_skill before using a skill and follow its instructions. Only load_skill and the active skill's tools are available. Switch skills when another skill is needed to complete the task.`,tools:s?r:[Z(o),...r]}},N=M.Root({...E()}),se=d.object({agentExecutionContext:d.custom()}),j=d.object({outcome:d.enum(["completed","blocked"]).describe('Return "completed" when the assigned task is done, including valid empty results. Return "blocked" when required information, context, or state is unavailable and the task cannot proceed.'),outputMessage:d.string().trim().min(1).describe("A clear, concise user-facing response describing the result or blocker. Use Markdown when it improves readability."),summary:d.string().describe("A concise orchestration summary. For a blocker, identify the missing prerequisite and capability needed.")}),we=({id:e,name:a,description:o,systemPrompt:t,skillLoaders:r,toolLoaders:s,modelTier:n="default",runtimeContextLoader:l,instructions:L})=>{let F=async(h,c)=>{let{getLocaleFromConfig:O,getStrings:z}=await import("./
|
|
9
|
+
Call load_skill before using a skill and follow its instructions. Only load_skill and the active skill's tools are available. Switch skills when another skill is needed to complete the task.`,tools:s?r:[Z(o),...r]}},N=M.Root({...E()}),se=d.object({agentExecutionContext:d.custom()}),j=d.object({outcome:d.enum(["completed","blocked"]).describe('Return "completed" when the assigned task is done, including valid empty results. Return "blocked" when required information, context, or state is unavailable and the task cannot proceed.'),outputMessage:d.string().trim().min(1).describe("A clear, concise user-facing response describing the result or blocker. Use Markdown when it improves readability."),summary:d.string().describe("A concise orchestration summary. For a blocker, identify the missing prerequisite and capability needed.")}),we=({id:e,name:a,description:o,systemPrompt:t,skillLoaders:r,toolLoaders:s,modelTier:n="default",runtimeContextLoader:l,instructions:L})=>{let F=async(h,c)=>{let{getLocaleFromConfig:O,getStrings:z}=await import("./T7LYQ56H.js"),y=await z({path:"./assets/agents/t9n",locale:O(c)});await u({text:y.runningAgent.replace("{agentName}",a)},c);try{let{activeSkillMiddleware:i,skillsPrompt:g,tools:_}=await re(r,s),{collectedEffects:G,middleware:I}=W(),{assignedTask:J,priorSteps:D,userRequest:U}=h.agentExecutionContext,k=await l?.({config:c}),{createChatModel:B}=await import("./orchestrator/models/chatModel.js"),H=await T({model:await B({modelTier:n,config:c}),tools:_,stateSchema:se,responseFormat:$(j),middleware:[i,I,await X(c)],systemPrompt:`${t}
|
|
10
10
|
|
|
11
11
|
Primary task assigned by the orchestrator: ${J}
|
|
12
12
|
Prior agent steps to reuse when relevant: ${JSON.stringify(D)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
var a=(o,t)=>t.find(r=>r.toLowerCase()===o.toLowerCase())??"",s=(o,t)=>{let r=new Set(t.map(e=>e.toLowerCase()));return o.filter(e=>e==="*"||r.has(e.toLowerCase()))};export{a,s as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
function i(o,e){let t=o?.configurable?.context;if(!t||typeof t!="object")throw new Error("Agent context missing");let n=e.filter(r=>!(r in t));if(n.length)throw new Error(`Agent context missing: ${n.join(", ")}`);return t}export{i as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.js";var e=`## GIS Agent Orchestrator
|
|
3
3
|
|
|
4
4
|
You are an orchestrator for an ArcGIS Maps SDK for JavaScript system.
|
|
5
5
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import b from"./AOT3PM2Q.js";import a from"./2H32MDP2.js";import"./QAVDW7A7.js";import"./QBZP6XOE.js";import"./GS5JDPZH.js";import"./A4ZVCRVF.js";import"./N2GN5WOI.js";import"./272R36XK.js";import"./5PV2GUZW.js";export default $arcgis.t(([,a])=>{return a},a,b)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{$ as je,Aa as Le,Ca as ve,Da as De,Ea as Nt,a as ft,b as R,ca as Pt,f as $,j as L,k as H,ta as oe,ua as at,wa as W,x as Ke,xa as Ot,y as pt}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{$ as je,Aa as Le,Ca as ve,Da as De,Ea as Nt,a as ft,b as R,ca as Pt,f as $,j as L,k as H,ta as oe,ua as at,wa as W,x as Ke,xa as Ot,y as pt}from"./7GDMXAF5.js";import{I as At,K as It,L as Rt,a as ot,v as Et,z as rt}from"./C3VLDYS2.js";import{$ as Oe,A as vt,C as Ct,Ca as st,D as te,E as _t,M as F,N as ue,P as xt,S as Pe,U as St,X as i,Z as tt,d as Mt,da as be,ea as Z,f as et,h as Tt,ha as me,ja as Ne,s as de,t as Re,w as Te,wa as nt,ya as kt}from"./A4ZVCRVF.js";import{N as U,i as bt}from"./N2GN5WOI.js";import{$a as B,Ca as yt,J as Ze,V as M,Ya as qe,aa as wt,ab as ce,c as ht,cb as Ie,fa as T,ia as Xe,q as Ye,ra as q,u as gt,va as Qe,wa as z}from"./272R36XK.js";function Ce(e){return"invoke"in e&&typeof e.invoke=="function"&&"_streamResponseChunks"in e}function fe(e){return typeof e=="object"&&e!=null&&"_queuedMethodOperations"in e&&"_getModelInstance"in e&&typeof e._getModelInstance=="function"}var _e=class extends Error{constructor(){super("The provided LLM already has bound tools. Please provide an LLM without bound tools to createAgent. The agent will bind the tools provided in the 'tools' parameter.")}},xe=class extends Error{toolNames;constructor(e){super(`The model has called multiple tools: ${e.join(", ")} to return a structured output. This is not supported. Please provide a single structured output.`),this.toolNames=e}},pe=class extends Error{toolName;errors;constructor(e,t){super(`Failed to parse structured output for tool '${e}':${t.map(o=>`
|
|
3
3
|
- ${o}`).join("")}.`),this.toolName=e,this.errors=t}},he=class extends Error{"~brand"="ToolInvocationError";toolCall;toolError;constructor(e,t){let o=e instanceof Error?e:new Error(String(e)),n=JSON.stringify(t.args);super(`Error invoking tool '${t.name}' with kwargs ${n} with error: ${o.stack}
|
|
4
4
|
Please fix the error and try again.`),this.toolCall=t,this.toolError=o}static isInstance(e){return e instanceof Error&&"~brand"in e&&e["~brand"]==="ToolInvocationError"}static[Symbol.hasInstance](e){return this.isInstance(e)}},ne=class jt extends Error{"~brand"="MiddlewareError";constructor(t,o){let n=t instanceof Error?t.message:String(t);super(n),this.name=t instanceof Error?t.name:`${o[0].toUpperCase()+o.slice(1)}Error`,t instanceof Error&&(this.cause=t)}static wrap(t,o){return Ke(t)?t:new jt(t,o)}static isInstance(t){return t instanceof Error&&"~brand"in t&&t["~brand"]==="MiddlewareError"}static[Symbol.hasInstance](t){return this.isInstance(t)}};var Lt=!0,Co=0,G=class it{schema;tool;options;constructor(t,o,n){this.schema=t,this.tool=o,this.options=n}get name(){return this.tool.function.name}static fromSchema(t,o){function n(a){return a??`extract-${++Co}`}if(de(t)||Te(t)){let a=Oe(t),l={type:"function",function:{name:n(a.title),strict:!1,description:a.description??"Tool for extracting structured output from the model's response.",parameters:a}};return new it(a,l,o)}let r;typeof t.name=="string"&&typeof t.parameters=="object"&&t.parameters!=null?r=t:r={name:n(t.title),description:t.description??"",parameters:t.schema||t};let s=Oe(t);return new it(s,{type:"function",function:r},o)}parse(t){let o=new tt(this.schema).validate(t);if(!o.valid)throw new pe(this.name,o.errors.map(n=>n.error));return t}},V=class Dt{_schemaType;schema;strict;constructor(t,o){if("schema"in t&&typeof t.schema=="object"&&t.schema!==null&&!("type"in t)){let n=t;this.schema=n.schema,this.strict=n.strict??Lt}else this.schema=t,this.strict=o??Lt}static fromSchema(t,o){let n=Oe(t);return new Dt(n,o)}parse(t){let o;if(typeof t.content=="string")o=t.content;else if(Array.isArray(t.content)){for(let n of t.content)if(typeof n=="object"&&n!==null&&"type"in n&&n.type==="text"&&"text"in n&&typeof n.text=="string"){o=n.text;break}}if(!(!o||o===""))try{let n=JSON.parse(o);return new tt(this.schema).validate(n).valid?n:void 0}catch{}}};function $t(e,t,o){if(!e)return[];if(typeof e=="object"&&e!==null&&"__responseFormatUndefined"in e)return[];if(Array.isArray(e)){if(e.every(r=>r instanceof G||r instanceof V))return e;if(e.every(r=>de(r)))return e.map(r=>G.fromSchema(r,t));if(e.every(r=>F(r)))return e.map(r=>G.fromSchema(r,t));if(e.every(r=>typeof r=="object"&&r!==null&&!F(r)&&!de(r)))return e.map(r=>G.fromSchema(r,t));throw new Error(`Invalid response format: list contains mixed types.
|
|
5
5
|
All items must be either InteropZodObject, Standard Schema, or plain JSON schema objects.`)}if(e instanceof G||e instanceof V)return[e];let n=_o(o);if(de(e))return n?[V.fromSchema(e)]:[G.fromSchema(e,t)];if(F(e))return n?[V.fromSchema(e)]:[G.fromSchema(e,t)];if(typeof e=="object"&&e!==null&&"properties"in e)return n?[V.fromSchema(e)]:[G.fromSchema(e,t)];throw new Error(`Invalid response format: ${String(e)}`)}function Bt(e){if(typeof e=="object"&&e!==null&&"schema"in e&&!Te(e)&&!de(e)&&!("type"in e)){let{schema:t,strict:o}=e;return V.fromSchema(t,o)}return V.fromSchema(e)}function _o(e){return!e||!Ce(e)||!("profile"in e)||typeof e.profile!="object"||!e.profile?!1:"structuredOutput"in e.profile&&e.profile.structuredOutput===!0}var $e=Symbol.for("AgentMiddleware");function E(e){return{[$e]:!0,name:e.name,stateSchema:e.stateSchema,contextSchema:e.contextSchema,wrapToolCall:e.wrapToolCall,wrapModelCall:e.wrapModelCall,beforeAgent:e.beforeAgent,beforeModel:e.beforeModel,afterModel:e.afterModel,afterAgent:e.afterAgent,tools:e.tools,streamTransformers:e.streamTransformers}}function xo(e,t){if(e.length<t.length||e.length>t.length+1)return!1;for(let o=0;o<t.length;o+=1)if(e[o]!==t[o])return!1;return!0}function So(e){let t;try{t=JSON.parse(e)}catch{return!1}return!Array.isArray(t)||t.length===0?!1:t.every(o=>{if(o==null||typeof o!="object")return!1;let n=o;return typeof n.id=="string"&&"value"in n})}function ko(e){if(e==null||typeof e!="object")return!1;let t=e;return t.type!=="constructor"||!Array.isArray(t.id)?!1:t.id[t.id.length-1]==="ToolMessage"}function Eo(e){return M.isInstance(e)?e.content:ko(e)?e.kwargs?.content:e}function ae(e){return()=>{let t=je.local(),o=new Map;function n(r,s,a){if(o.has(r))return;let l=typeof a=="string"?JSON.parse(a):a,u,m,c,h,d=new Promise((x,y)=>{u=x,m=y}),f=new Promise(x=>{c=x}),g=new Promise(x=>{h=x});o.set(r,{resolveOutput:u,rejectOutput:m,resolveStatus:c,resolveError:h}),t.push({name:s,callId:r,input:l,output:d,status:f,error:g})}return{__native:!0,init:()=>({toolCalls:t}),process(r){if(!xo(r.params.namespace,e))return!0;if(r.method==="messages"){let s=r.params.data;if(s.event==="content-block-finish"){let a=s.contentBlock??s.content_block;a?.type==="tool_call"&&n(String(a.id??""),String(a.name??""),a.args??a.input)}}if(r.method==="tools"){let s=r.params.data,a=s.tool_call_id;s.event==="tool-started"&&n(a,s.tool_name??"unknown",s.input);let l=a?o.get(a):void 0;if(l){if(s.event==="tool-finished")l.resolveOutput(Eo(s.output)),l.resolveStatus("finished"),l.resolveError(void 0),o.delete(a);else if(s.event==="tool-error"){let u=s.message??"unknown error";if(So(u))return!0;l.rejectOutput(new Error(u)),l.resolveStatus("error"),l.resolveError(u),o.delete(a)}}}return!0},finalize(){for(let r of o.values())r.resolveStatus("finished"),r.resolveError(void 0),r.resolveOutput(void 0);o.clear(),t.close()},fail(r){for(let s of o.values())s.resolveStatus("error"),s.resolveError(r instanceof Error?r.message:String(r)),s.rejectOutput(r);o.clear(),t.fail(r)}}}}function X(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Se(e){return e.join("\0")}function Ut(e,t){if(t.length>e.length)return!1;for(let o=0;o<t.length;o+=1)if(e[o]!==t[o])return!1;return!0}function ge(e=[]){return()=>{let t=je.local(),o=new Map,n=new Map,r=new Map,s=new Map,a=e.length;function l(d,f){let g=Se(d);if(o.has(g))return;let x=(X(f)&&X(f.metadata)?f.metadata:void 0)?.lc_agent_name;o.set(g,typeof x=="string"?x:void 0)}function u(d){if(!X(d))return;let f=d.id;if(typeof f!="string")return;let g=d.input,x;if(X(g)&&X(g.tool_call)){let y=g.tool_call.id;typeof y=="string"&&(x=y)}else if(Array.isArray(g)){for(let y of g)if(X(y)&&typeof y.id=="string"){x=y.id;break}}x!=null&&n.set(f,x)}function m(d){let f=r.get(Se(d));if(typeof f=="string"&&f.length>0)return{type:"toolCall",tool_call_id:f};let g=d[d.length-1],x=g.indexOf(":");if(x===-1)return;let y=g.slice(x+1);if(y.length===0)return;let w=n.get(y);if(!(typeof w!="string"||w.length===0))return{type:"toolCall",tool_call_id:w}}function c(d){if(d.length!==a+1||!Ut(d,e))return;let f=Se(d);if(s.has(f))return;let g=o.get(f);if(typeof g!="string"||g.length===0)return;let x=Pt(d),y=x.init(),w=ae(d)(),O=w.init(),A=ge(d)(),N=A.init(),Y,j,b=new Promise((J,le)=>{Y=J,j=le});s.set(f,{key:f,path:d,name:g,messages:x,toolCall:w,nested:A,resolveOutput:Y,rejectOutput:j,latestValues:void 0,done:!1}),t.push({name:g,cause:m(d),output:b,messages:y.messages,toolCalls:O.toolCalls,subagents:N.subagents})}function h(d,f){d.done||(d.done=!0,f.type==="resolve"?d.resolveOutput(d.latestValues):d.rejectOutput(f.error),d.messages.finalize?.(),d.toolCall.finalize?.(),d.nested.finalize?.())}return{__native:!0,init:()=>({subagents:t}),process(d){let f=d.params.namespace,g=d.params.data,x=d.method==="tasks"&&X(g)&&"result"in g;d.method==="tools"&&X(g)&&g.event==="tool-started"&&typeof g.tool_call_id=="string"&&g.tool_call_id.length>0&&r.set(Se(f),g.tool_call_id),d.method==="tasks"&&!x&&(l(f,g),u(g),c(f));for(let y of s.values())if(!y.done&&Ut(f,y.path)&&(y.messages.process(d),y.toolCall.process(d),y.nested.process(d),Se(f)===y.key)){if(d.method==="values"&&X(g))y.latestValues=g;else if(d.method==="lifecycle"&&X(g)){let w=g.event;w==="completed"||w==="interrupted"?h(y,{type:"resolve"}):w==="failed"&&h(y,{type:"reject",error:new Error(`Subagent ${y.name} failed`)})}}return!0},finalize(){for(let d of s.values())h(d,{type:"resolve"});t.close()},fail(d){for(let f of s.values())h(f,{type:"reject",error:d});t.fail(d)}}}}var lt=Symbol.for("langgraph-zod");lt in globalThis||(globalThis[lt]=new WeakSet);function zt(e){let t=globalThis[lt];t.has(e)||(Object.defineProperty(e,"langgraph",{get(){let o=this;return{metadata(n){return De(o,{jsonSchemaExtra:n})},reducer(n,r){return De(o,{default:Pe(o),reducer:{schema:r,fn:n}})}}}}),t.add(e))}try{zt(i.ZodType.prototype),zt(U.ZodType.prototype)}catch(e){throw new Error("Failed to extend Zod with LangGraph-related methods. This is most likely a bug, consider opening an issue and/or using `withLangGraph` to augment your Zod schema.",{cause:e})}var Ft=class extends bt{constructor(e){super(),this.parent=e,this._map=this.parent._map}add(e,...t){let o=t[0];if(o&&!o?.default){let n=Pe(e);n!=null&&(o.default=n)}return super.add(e,...t)}},Ao=new Ft(ve);function Wt(e=!0,t,o=[]){let n={jumpTo:new at},r={},s={},a=l=>{if(W.isInstance(l)){for(let[m,c]of Object.entries(l.fields))if(!(m in n)){if(n[m]=c,m.startsWith("_"))continue;oe.isInstance(c)?(r[m]=c.inputSchema||c.valueSchema,s[m]=c.valueSchema):(r[m]=c,s[m]=c)}return}let u=ue(l);for(let[m,c]of Object.entries(u)){let h=m.startsWith("_");if(!(m in n)){if(Re(c)){let d=ve.get(c);if(d?.reducer){d.reducer.schema?(n[m]=new oe(c,{inputSchema:d.reducer.schema,reducer:d.reducer.fn}),h||(r[m]=d.reducer.schema,s[m]=c)):(n[m]=new oe(c,{reducer:d.reducer.fn}),h||(r[m]=c,s[m]=c));continue}}n[m]=c,h||(r[m]=c,s[m]=c)}}};t&&(W.isInstance(t)||F(t))&&a(t);for(let l of o)l.stateSchema&&(W.isInstance(l.stateSchema)||F(l.stateSchema))&&a(l.stateSchema);return e&&(s.structuredResponse=new at),{state:new W({messages:Le,...n}),input:new W({messages:Le,...r}),output:new W({messages:Le,...s})}}var ct=/<name>(.*?)<\/name>/s,dt=/<content>(.*?)<\/content>/s;function Io(e,t){if(W.isInstance(e)){let o={};for(let n of Object.keys(e.fields))n in t&&(o[n]=t[n]);return o}if(Te(e))return te(e,t);throw new Error(`Invalid state schema type: ${typeof e}`)}function Gt(e){if(!T.isInstance(e)||Xe.isInstance(e)||!e.name)return e;let{name:t}=e;if(typeof e.content=="string")return new T({...e.lc_kwargs,content:`<name>${t}</name><content>${e.content}</content>`,name:void 0});let o=[],n=0;for(let r of e.content)typeof r=="string"?(n+=1,o.push(`<name>${t}</name><content>${r}</content>`)):typeof r=="object"&&"type"in r&&r.type==="text"?(n+=1,o.push({...r,text:`<name>${t}</name><content>${r.text}</content>`})):o.push(r);return n||o.unshift({type:"text",text:`<name>${t}</name><content></content>`}),new T({...e.lc_kwargs,content:o,name:void 0})}function Jt(e){if(!T.isInstance(e)||!e.content)return e;let t=[],o;if(Array.isArray(e.content))t=e.content.filter(n=>{if(n.type==="text"&&typeof n.text=="string"){let r=n.text.match(ct),s=n.text.match(dt);return r&&(!s||s[1]==="")?(o=r[1],!1):!0}return!0}).map(n=>{if(n.type==="text"&&typeof n.text=="string"){let r=n.text.match(ct),s=n.text.match(dt);return!r||!s?n:(o=r[1],{...n,text:s[1]})}return n});else{let n=e.content,r=n.match(ct),s=n.match(dt);if(!r||!s)return e;o=r[1],t=s[1]}return new T({...Object.keys(e.lc_kwargs??{}).length>0?e.lc_kwargs:e,content:t,name:o})}function ie(e){return be.isRunnable(e)}function Ht(e){return Ce(e)?"bindTools"in e&&typeof e.bindTools=="function":!1}var ut=(e,t,o={})=>{if(Ht(e))return e.bindTools(t,o);if(Z.isRunnableBinding(e)&&Ht(e.bound)){let n=e.bound.bindTools(t,o);return Z.isRunnableBinding(n)?new Z({bound:n.bound,config:{...e.config,...n.config},kwargs:{...e.kwargs,...n.kwargs},configFactories:n.configFactories??e.configFactories}):new Z({bound:n,config:e.config,kwargs:e.kwargs,configFactories:e.configFactories})}return null};function Be(e){if(typeof e=="function")return;let t=e;if(me.isRunnableSequence(t)&&(t=t.steps.find(o=>Z.isRunnableBinding(o))||t),!fe(t)){if(Z.isRunnableBinding(t)){let o=t.kwargs!=null&&typeof t.kwargs=="object"&&"tools"in t.kwargs&&Array.isArray(t.kwargs.tools)&&t.kwargs.tools.length>0,n=t.config!=null&&typeof t.config=="object"&&"tools"in t.config&&Array.isArray(t.config.tools)&&t.config.tools.length>0;if(o||n)throw new _e}if("tools"in t&&t.tools!==void 0&&Array.isArray(t.tools)&&t.tools.length>0)throw new _e}}function we(e){return!!(T.isInstance(e)&&e.tool_calls&&e.tool_calls.length>0)}function Vt(e){if(e==null)return new z("");if(z.isInstance(e))return e;if(typeof e=="string")return new z({content:[{type:"text",text:e}]});throw new Error(`Invalid systemPrompt type: expected string or SystemMessage, got ${typeof e}`)}async function Kt(e,t,o={}){let n=ut(e,t,o);if(n)return n;if(fe(e)){let r=ut(await e._getModelInstance(),t,o);if(r)return r}if(me.isRunnableSequence(e)){let r=e.steps.findIndex(s=>Z.isRunnableBinding(s)||Ce(s)||fe(s));if(r>=0){let s=ut(e.steps[r],t,o);if(s){let a=e.steps.slice();return a.splice(r,1,s),me.from(a)}}}throw new Error(`llm ${e} must define bindTools method.`)}function Ro(e){if(e.length===0)return;if(e.length===1)return e[0];function t(n,r){return async(s,a)=>n(s,async u=>r(u,a))}let o=e[e.length-1];for(let n=e.length-2;n>=0;n--)o=t(e[n],o);return o}function Yt(e){let t=e.filter(o=>o.wrapToolCall);if(t.length!==0)return Ro(t.map(o=>{let n=o.wrapToolCall;return async(s,a)=>{let l=s.state,u=new Set,m=async c=>{let h={...l,...c.state};try{return await a({...c,state:h})}catch(d){throw u.add(d),d}};try{let c=await n({...s,state:{messages:l.messages,...o.stateSchema?Io(o.stateSchema,{...l}):{}}},m);if(!M.isInstance(c)&&!H(c))throw new Error(`Invalid response from "wrapToolCall" in middleware "${o.name}": expected ToolMessage or Command, got ${typeof c}`);return c}catch(c){throw u.has(c)?c:ne.wrap(c,o.name)}}}))}var Po=["tags","metadata","runName","maxConcurrency","recursionLimit","configurable"];function Zt(e){let t={};for(let o of Po){let n=e[o];n!==void 0&&(t[o]=n)}return t}async function Xt(e,t){let o={};for(let n of e){if(!n.stateSchema)continue;let r;if(W.isInstance(n.stateSchema)){let l={};for(let[u,m]of Object.entries(n.stateSchema.fields))oe.isInstance(m)?l[u]=m.inputSchema||m.valueSchema:l[u]=m;r=U.object(l)}else if(F(n.stateSchema))r=n.stateSchema;else continue;let s=await vt(St(r,l=>l.startsWith("_")),t);if(s.success){Object.assign(o,s.data);continue}let a=s.error.issues.filter(l=>l.code==="invalid_type").map(l=>` - ${l.path.join(".")}: Required`).join(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as g,b as p}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as g,b as p}from"./63OF33IL.js";import{s as l}from"./7GDMXAF5.js";var m="human-in-the-loop",w="Agent execution requires approval",f="Agent execution rejected by the user.",y="human-in-the-loop-tool",h="Tool execution requires approval";function x(t={}){let{outputKey:e}=t;return g(m,{wrapAgent:async(n,r)=>{let a=b(n),o=$(a,n),i=c(n.config?.configurable);if(i?.agentId!==a)throw new l(await I({agentId:a,interruptId:o,options:t,request:n}));if(i.id!==o){if(T(a,i.id))return await r(n);throw new l(await I({agentId:a,interruptId:o,options:t,request:n}))}if(i.payload===!1)return{outputMessage:f,status:"failed",summary:f};let u=e?{...n.state,[e]:i.payload}:n.state,d={...n,state:u};return await r(d)}},{outputKey:e})}function H(t={}){let{outputKey:e}=t;return p(y,{wrapToolCall:async(n,r)=>{let a=n.tool.name,o=q(n.config?.configurable),i=C(o,n.toolCallId??a),u=c(n.config?.configurable);if(u?.agentId!==o||u.id!==i)throw new l(await M({agentId:o,interruptId:i,options:t,request:n}));if(u.payload===!1)return`Tool call "${a}" was rejected by the user.`;let d=e?{...n.input,[e]:u.payload}:n.input,s={...n,input:d};return await r(s)}})}async function I(t){let{agentId:e,interruptId:n,options:r,request:a}=t,o=await r.interrupt?.({...a,agentId:e});return{agentId:e,id:n,kind:o?.kind??"booleanChoice",message:o?.message??w,metadata:o?.metadata}}function b(t){return typeof t.config?.configurable?.agentId=="string"?t.config.configurable.agentId:t.agent.id}function $(t,e){let n=e.config?.configurable?.thread_id,r=typeof n=="string"&&n?`${n}:`:"";return`${t}:${r}${e.nodeName}`}function T(t,e){return e.startsWith(`${t}:tool:`)}function q(t){return typeof t?.agentId=="string"?t.agentId:"llm-agent"}function C(t,e){return`${t}:tool:${e}`}async function M(t){let{agentId:e,interruptId:n,options:r,request:a}=t,{input:o,tool:i,toolCallId:u}=a,d=i.name,s=await r.interrupt?.({...a,args:o,toolName:d,toolCallId:u});return{agentId:e,id:n,kind:s?.kind??"booleanChoice",message:s?.message??`${h}
|
|
3
3
|
Tool: ${d}`,metadata:s?.metadata??{args:o,toolCallId:u,toolName:d}}}function N(t){return c(t?.configurable)?.payload}function c(t){let e=t?.hitlResponse;return e&&typeof e=="object"&&"id"in e&&"agentId"in e?e:null}export{x as a,H as b,N as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as i,c as g}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as i,c as g}from"./PR4VMSKD.js";import{l}from"./NAVK5JJ2.js";var h=n=>{let o=g(n,"lang",globalThis.navigator?.language||c);return{lang:o,t9nLocale:d(o)}},C=(n,o,a,e)=>{let t,s=()=>L(n,o(),e).then(r=>{(t?.lang!==r.lang||t.t9nLocale!==r.t9nLocale||t.t9nStrings!==r.t9nStrings)&&a(r),t=r}).catch(r=>{l("error","intl","Error updating component locale state",{detail:{error:r}})});return queueMicrotask(s),i(n,["lang"],s)},L=async(n,o,a=n.localName.split("-").slice(1).join("-"))=>{let{lang:e,t9nLocale:t}=h(n),s=`${o}/${a}/t9n`,f=a===null?{}:await m(t,s,"messages.");return{lang:e,t9nLocale:t,t9nStrings:f}};var $="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),b=new Set($),c="en",v={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},m=async(n,o,a="")=>{let e=`${o}/${a}`,t=`${e}${n}.json`;return u[t]??=p(n,e),await u[t]},u={},p=async(n,o)=>{let a=`${o}${n}.json`;try{let e=await fetch(a);if(e.ok)return await e.json()}catch(e){return l("error","intl",`An unknown error occurred while fetching localization strings at ${a}`,{detail:{error:e}}),{}}return n===c?{}:await p(c,o)},d=n=>{let[o,a]=n.split("-"),e=o.toLowerCase(),t=e;return a&&(t=`${e}-${a.toUpperCase()}`),t=v[t]??t,b.has(t)?t:a?d(e):c};export{h as a,C as b,m as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
var l={cancelled:"circle-disallowed",completed:"check-circle",failed:"exclamation-mark-circle",interrupted:"exclamation-mark-triangle",running:"spinner"},p=new Set(["workflow","node","model","tool","retriever"]);function m(e){let r=new Map;for(let t of e){let a=t.span,n=r.get(a.id),i=n?.startedAt??t.timestamp,s=n?.metadata||a.metadata?{...n?.metadata,...a.metadata}:void 0,o={runId:t.runId,id:a.id,parentId:a.parentId??n?.parentId,agentId:t.agentId??n?.agentId,label:a.label,type:a.type,startedAt:i,...n?.input!==void 0&&{input:n.input},...n?.output!==void 0&&{output:n.output},...n?.error&&{error:n.error},...s&&{metadata:s}};t.phase==="started"?r.set(a.id,{...o,status:"running",...t.span.input!==void 0&&{input:t.span.input}}):r.set(a.id,{...o,status:t.phase,endedAt:t.timestamp,durationMs:Math.max(0,t.timestamp-i),...t.phase==="completed"&&t.span.output!==void 0&&{output:t.span.output},...t.phase==="failed"&&{error:t.span.error}})}return r}function f(e,r){let t=e[0];if(!t)return;let a=[...r.values()].filter(d=>d.type==="workflow"&&!d.parentId),n=a.at(-1),i=n??r.get(t.span.id),s=a[0]?.startedAt??t.timestamp,o=Math.max(0,(n?.endedAt??e.at(-1).timestamp)-s);return{...i,startedAt:s,durationMs:o}}function M(e,r){let t,a=0;for(let n of r)n.span.type!=="workflow"||n.span.parentId||(n.phase==="interrupted"?t??=n.timestamp:t!==void 0&&(a+=Math.max(0,n.timestamp-t),t=void 0));return t!==void 0&&(a+=Math.max(0,(e.endedAt??r.at(-1)?.timestamp??t)-t)),{elapsedMs:e.durationMs,interruptWaitMs:a,elapsedExcludingInterruptsMs:e.durationMs!==void 0?Math.max(0,e.durationMs-a):void 0}}function h(e){let r=[...e.values()].find(a=>a.type==="workflow"&&!a.parentId)?.input;if(!r||typeof r!="object"||!("agentExecutionContext"in r))return"";let t=r.agentExecutionContext;return!t||typeof t!="object"||!("userRequest"in t)?"":typeof t.userRequest=="string"?t.userRequest:""}function v(e){return e.durationMs===void 0?e.status:e.durationMs<1e3?`${e.durationMs} ms`:`${(e.durationMs/1e3).toFixed(1)} s`}function g(e){return!e.metadata?.internal&&(e.type==="model"||e.type==="tool"||e.type==="node")}function w(e){let r=new Map(e.map(s=>[s.id,s])),t=[...r.values()].filter(c),a=new Set(t.map(s=>s.id)),n=new Map,i=[];for(let s of t){let o=u(s,r,a);if(o){let d=n.get(o)??[];d.push(s),n.set(o,d)}else i.push(s)}return{visibleSpans:t,childrenByParent:n,rootSpans:i}}function u(e,r,t){let a=e.parentId,n=new Set;for(;a&&!n.has(a);){if(t.has(a))return a;n.add(a),a=r.get(a)?.parentId}}function c(e){return!e.metadata?.internal&&(e.status==="failed"||p.has(e.type))}export{l as a,m as b,f as c,M as d,h as e,v as f,g,w as h};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
var a=async t=>{try{let{createEmbeddingModel:e}=await import("./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
var a=async t=>{try{let{createEmbeddingModel:e}=await import("./YJEARDAZ.js").then(m=>m.default.then(e=>({createEmbeddingModel:e})));return await(await e()).embedDocuments(t)}catch(e){throw console.error("Failed to generate embeddings:",e),e}};export{a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
var i=(e,o)=>(s,t)=>{let c=t?.configurable?.services;for(let r of e)if(!c?.[r])throw new Error(`${o} requires services.${r} to be available.`);return s};export{i as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as o,b as s}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as o,b as s}from"./WHIWOYHN.js";export default $arcgis.t(([c,d])=>{var a=new Map,r=null,h=()=>{let e=c.getDefault().helperServices;if(!e?.aiModels?.url)throw new Error("AI Models Service URL is not defined in the portal's helper services.");return e.aiModels.url},l=async e=>{let n=h();a.size===0&&(r||(r=(async()=>{try{(await d(`${n}/models`)).data.models.forEach(t=>a.set(t.name,t))}catch(t){throw r=null,t}})()),await r);let i=a.get(e);if(!i)throw new Error(`Model '${e}' is not available in the discovery service.`);return i.endpoint},u=async(e="default")=>await l(o[e]),w=async(e="default")=>await l(s[e]);return{a:u,b:w}},"portal/Portal","request")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as W,c as M}from"./GMZUN5SF.js";import"./OVIQ5NSE.js";import"./QUZTFUWM.js";import{a as B}from"./DGCWQYN3.js";import"./DYSPEU7W.js";import{c as V}from"./7MCFHVEH.js";import{C as D,x as R}from"./RE7MJTEF.js";import"./R74ZHFA6.js";import{a as z}from"./2O52MJ3D.js";import"./DI3VGUJY.js";import"./VIJVRJHL.js";import{a as U}from"./C76HLPKU.js";import"./RFPTOFM4.js";import"./BMPBJXD7.js";import{a as H}from"./GHFOAS7T.js";import{a as F}from"./6WYVG3JI.js";import{a as $,b as G}from"./5TW2NFES.js";import{e as L}from"./CDS2HGQY.js";import{S as J,s as q}from"./QEGO4B2W.js";import{a as E}from"./EEHDAYOG.js";import"./XWNZMKQF.js";import"./FSLPYC4Y.js";import{N as c}from"./AMP43OT2.js";import"./2UKFCF2J.js";import"./UZLQALHY.js";export default $arcgis.t(([oe,se,S,C,{property:a,subclass:l}])=>{var ne=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,f=(e,t,r,s)=>{for(var o=s>1?void 0:s?ie(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&&ne(t,r,o),o},d=class extends C{constructor(e){super(e)}static fromJSON(e){return new d({id:e.id,sourceAnchorId:e.source_anchor_id,sourceNodeId:e.source_node_id,targetAnchorId:e.target_anchor_id,targetNodeId:e.target_node_id})}};f([a()],d.prototype,"id",2);f([a()],d.prototype,"sourceAnchorId",2);f([a()],d.prototype,"sourceNodeId",2);f([a()],d.prototype,"targetAnchorId",2);f([a()],d.prototype,"targetNodeId",2);d=f([l("Edge")],d);var ae=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,I=(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)}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()],p.prototype,"id",2);I([a()],p.prototype,"label",2);I([a()],p.prototype,"type",2);p=I([l("BaseNode")],p);var de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,j=(e,t,r,s)=>{for(var o=s>1?void 0:s?pe(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&&de(t,r,o),o},ue=e=>e.replace(/_([a-z])/gu,(t,r)=>r.toUpperCase()),h=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 U(ue(this.name))]}static fromJSON(e){return new h({name:e.name,requireApproval:e.require_approval})}};j([a()],h.prototype,"name",2);j([a()],h.prototype,"requireApproval",2);j([a()],h.prototype,"type",2);h=j([l("ArcgisTool")],h);var me=Object.defineProperty,he=Object.getOwnPropertyDescriptor,K=e=>{throw TypeError(e)},y=(e,t,r,s)=>{for(var o=s>1?void 0:s?he(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&&me(t,r,o),o},le=(e,t,r)=>t.has(e)||K("Cannot "+r),ge=(e,t,r)=>t.has(e)?K("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r)=>(le(e,t,"access private method"),r),x,Q,u=class extends p{constructor(e){super(e),ge(this,x),this.type="agent-node"}createRuntimeNode(){let e;return async(t,r)=>{e??=fe(this,x,Q).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=B(e.structured_output)),t.tools=e.tools?.filter(r=>r.type==="arcgis_tool").map(r=>h.fromJSON(r)),t}};x=new WeakSet;Q=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})};y([a()],u.prototype,"type",2);y([a()],u.prototype,"prompt",2);y([a()],u.prototype,"outputSchema",2);y([a()],u.prototype,"tools",2);y([a()],u.prototype,"modelTier",2);u=y([l("AgentNode")],u);var ye=Object.defineProperty,we=Object.getOwnPropertyDescriptor,T=(e,t,r,s)=>{for(var o=s>1?void 0:s?we(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&&ye(t,r,o),o},g=class extends p{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([l("EndMessageNode")],g);var be=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,X=e=>{throw TypeError(e)},N=(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},Oe=(e,t,r)=>t.has(e)||X("Cannot "+r),Se=(e,t,r)=>t.has(e)?X("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Z=(e,t,r)=>(Oe(e,t,"access private method"),r),v,Y,ee,m=class extends p{constructor(e){super(e),Se(this,v),this.type="human-in-the-loop-node",this.conditions=[]}createRuntimeNode(){return async(e,t)=>{let r=ve(t,this.id),s=`${r}:${this.id}`,o=V(t);if(o===void 0||!Ie(o,this.response?.type))throw new q({agentId:r,id:s,kind:_e(this.response?.type),message:await Z(this,v,Y).call(this,e),metadata:Z(this,v,ee).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=je(r),o=this.conditions.find(n=>n.outcome===s);if(o)return e.outgoingEdges.find(n=>n.sourceAnchorId===o.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(({outcome:r,source_anchor_id:s})=>({outcome:r,sourceAnchorId:s})),t}};v=new WeakSet;Y=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)};ee=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"?Ae(e,r.reference)?.map(String):void 0};N([a()],m.prototype,"type",2);N([a()],m.prototype,"message",2);N([a()],m.prototype,"response",2);N([a()],m.prototype,"conditions",2);m=N([l("HumanInTheLoopNode")],m);function ve(e,t){let r=e?.configurable?.agentId;return typeof r=="string"&&r?r:t}function _e(e){switch(e){case"singleSelect":return"singleSelection";case"multipleSelect":return"multipleSelection";case"textInput":return"textInput";default:return"booleanChoice"}}function Ie(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 je(e){return e===!1?"dismissed":"confirmed"}function Ae(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 Ee=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,te=(e,t,r,s)=>{for(var o=s>1?void 0:s?Je(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&&Ee(t,r,o),o},b=class extends p{constructor(e){super(e),this.type="start-node"}createRuntimeNode(){return e=>({question:e.agentExecutionContext.userRequest})}static fromJSON(e){return new b({id:e.id,label:e.label,type:"start-node"})}};te([a()],b.prototype,"type",2);b=te([l("StartNode")],b);function xe(e){switch(e.type){case"agent_node":return u.fromJSON(e);case"end_message_node":return g.fromJSON(e);case"human_input_node":return m.fromJSON(e);case"start_node":return b.fromJSON(e);default:throw new Error(`WebAgent node "${e.id}" uses unsupported type "${e.type}".`)}}function Pe(e={}){let t=Object.keys(e);if($(t),t.includes("nodes"))throw new Error("node state cannot define reserved field: nodes.");let r=G(e);return J.Root({...r,nodes:J({reducer:(s,o)=>({...s,...o}),default:()=>({})}),...L()})}function re(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 Pe(s)}var P=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=>d.fromJSON(r)),t.graph.nodes.map(r=>xe(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:w,value:A})=>[w,A])),s=re(this.getSchemas(),{variables:r}),o=this.nodes.find(w=>w.type==="start-node")?.id,n={},i=[];for(let[w,A]of this.nodes.entries()){let O=t[w];O&&(O.runtimeNode&&(n[A.id]=O.runtimeNode),i.push(...O.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()])))}},_=class extends F{constructor(t){super(),this._createUnloadedGraph=()=>{throw new Error("WebAgent must be loaded before it can run.")},Object.assign(this,t)}async load(){if(this.portalItem){try{await this.portalItem.load()}catch(s){throw new S("web-agent:load-portal-item","Failed to load portal item",{error:s})}let r=await this.portalItem.fetchData();if(this.sourceJSON=r,!this.portalItem.title)throw new S("web-agent:missing-title","The portal item is missing a title")}if(!this.sourceJSON)throw new S("web-agent:missing-source-json","The source JSON is missing");if(!this.sourceJSON.description)throw new S("web-agent:missing-description","The source JSON is missing a description");let t=P.fromJSON(this.sourceJSON);return await t.load(),this._runtime=t,this.description=this.sourceJSON.description,this.name=this.portalItem?.title??`web-agent-${Date.now()}`,this.generate(),this}generate(){if(!this._runtime){this.workspace=re([]),this.createGraph=this._createUnloadedGraph;return}let{createGraph:t,workspace:r}=this._runtime.generate();this.workspace=r,this.createGraph=t}},k=class extends R{static{this.properties={agent:0,context:0,itemId:1,workflow:0}}#e;async getContext(){return W(this.context)?await this.context():this.context}async load(){let t;if(this.itemId){let r=se.getDefault();t=new _({portalItem:new oe({id:this.itemId,portal:r})})}else this.workflow&&(t=new _({sourceJSON:this.workflow}));if(t&&(await t.load(),this.agent=t),!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()}};D("arcgis-assistant-agent",k);return k},"portal/PortalItem","portal/Portal","core/Error","core/Accessor","core/accessorSupport/decorators")
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as W,c as M}from"./NYFL2F5L.js";import"./AGDGDULE.js";import"./FIZMK7GS.js";import{a as B}from"./FGQH46Z2.js";import"./PR4VMSKD.js";import{c as V}from"./SRXUC4QB.js";import{C as D,x as R}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import{a as z}from"./D7CRICBG.js";import"./63OF33IL.js";import"./3UVQLYUK.js";import{a as U}from"./V66TS2BB.js";import"./GS5JDPZH.js";import"./S6OUM5X2.js";import{a as H}from"./I724KIFI.js";import{a as F}from"./HU527DML.js";import{a as $,b as G}from"./WEBAQIUT.js";import{e as L}from"./XLHYQNAM.js";import{S as J,s as q}from"./7GDMXAF5.js";import{a as E}from"./5XZ5VL42.js";import"./C3VLDYS2.js";import"./A4ZVCRVF.js";import{N as c}from"./N2GN5WOI.js";import"./272R36XK.js";import"./5PV2GUZW.js";export default $arcgis.t(([oe,se,S,C,{property:a,subclass:l}])=>{var ne=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,f=(e,t,r,s)=>{for(var o=s>1?void 0:s?ie(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&&ne(t,r,o),o},d=class extends C{constructor(e){super(e)}static fromJSON(e){return new d({id:e.id,sourceAnchorId:e.source_anchor_id,sourceNodeId:e.source_node_id,targetAnchorId:e.target_anchor_id,targetNodeId:e.target_node_id})}};f([a()],d.prototype,"id",2);f([a()],d.prototype,"sourceAnchorId",2);f([a()],d.prototype,"sourceNodeId",2);f([a()],d.prototype,"targetAnchorId",2);f([a()],d.prototype,"targetNodeId",2);d=f([l("Edge")],d);var ae=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,I=(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)}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()],p.prototype,"id",2);I([a()],p.prototype,"label",2);I([a()],p.prototype,"type",2);p=I([l("BaseNode")],p);var de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,j=(e,t,r,s)=>{for(var o=s>1?void 0:s?pe(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&&de(t,r,o),o},ue=e=>e.replace(/_([a-z])/gu,(t,r)=>r.toUpperCase()),h=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 U(ue(this.name))]}static fromJSON(e){return new h({name:e.name,requireApproval:e.require_approval})}};j([a()],h.prototype,"name",2);j([a()],h.prototype,"requireApproval",2);j([a()],h.prototype,"type",2);h=j([l("ArcgisTool")],h);var me=Object.defineProperty,he=Object.getOwnPropertyDescriptor,K=e=>{throw TypeError(e)},y=(e,t,r,s)=>{for(var o=s>1?void 0:s?he(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&&me(t,r,o),o},le=(e,t,r)=>t.has(e)||K("Cannot "+r),ge=(e,t,r)=>t.has(e)?K("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r)=>(le(e,t,"access private method"),r),x,Q,u=class extends p{constructor(e){super(e),ge(this,x),this.type="agent-node"}createRuntimeNode(){let e;return async(t,r)=>{e??=fe(this,x,Q).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=B(e.structured_output)),t.tools=e.tools?.filter(r=>r.type==="arcgis_tool").map(r=>h.fromJSON(r)),t}};x=new WeakSet;Q=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})};y([a()],u.prototype,"type",2);y([a()],u.prototype,"prompt",2);y([a()],u.prototype,"outputSchema",2);y([a()],u.prototype,"tools",2);y([a()],u.prototype,"modelTier",2);u=y([l("AgentNode")],u);var ye=Object.defineProperty,we=Object.getOwnPropertyDescriptor,T=(e,t,r,s)=>{for(var o=s>1?void 0:s?we(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&&ye(t,r,o),o},g=class extends p{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([l("EndMessageNode")],g);var be=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,X=e=>{throw TypeError(e)},N=(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},Oe=(e,t,r)=>t.has(e)||X("Cannot "+r),Se=(e,t,r)=>t.has(e)?X("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Z=(e,t,r)=>(Oe(e,t,"access private method"),r),v,Y,ee,m=class extends p{constructor(e){super(e),Se(this,v),this.type="human-in-the-loop-node",this.conditions=[]}createRuntimeNode(){return async(e,t)=>{let r=ve(t,this.id),s=`${r}:${this.id}`,o=V(t);if(o===void 0||!Ie(o,this.response?.type))throw new q({agentId:r,id:s,kind:_e(this.response?.type),message:await Z(this,v,Y).call(this,e),metadata:Z(this,v,ee).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=je(r),o=this.conditions.find(n=>n.outcome===s);if(o)return e.outgoingEdges.find(n=>n.sourceAnchorId===o.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(({outcome:r,source_anchor_id:s})=>({outcome:r,sourceAnchorId:s})),t}};v=new WeakSet;Y=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)};ee=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"?Ae(e,r.reference)?.map(String):void 0};N([a()],m.prototype,"type",2);N([a()],m.prototype,"message",2);N([a()],m.prototype,"response",2);N([a()],m.prototype,"conditions",2);m=N([l("HumanInTheLoopNode")],m);function ve(e,t){let r=e?.configurable?.agentId;return typeof r=="string"&&r?r:t}function _e(e){switch(e){case"singleSelect":return"singleSelection";case"multipleSelect":return"multipleSelection";case"textInput":return"textInput";default:return"booleanChoice"}}function Ie(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 je(e){return e===!1?"dismissed":"confirmed"}function Ae(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 Ee=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,te=(e,t,r,s)=>{for(var o=s>1?void 0:s?Je(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&&Ee(t,r,o),o},b=class extends p{constructor(e){super(e),this.type="start-node"}createRuntimeNode(){return e=>({question:e.agentExecutionContext.userRequest})}static fromJSON(e){return new b({id:e.id,label:e.label,type:"start-node"})}};te([a()],b.prototype,"type",2);b=te([l("StartNode")],b);function xe(e){switch(e.type){case"agent_node":return u.fromJSON(e);case"end_message_node":return g.fromJSON(e);case"human_input_node":return m.fromJSON(e);case"start_node":return b.fromJSON(e);default:throw new Error(`WebAgent node "${e.id}" uses unsupported type "${e.type}".`)}}function Pe(e={}){let t=Object.keys(e);if($(t),t.includes("nodes"))throw new Error("node state cannot define reserved field: nodes.");let r=G(e);return J.Root({...r,nodes:J({reducer:(s,o)=>({...s,...o}),default:()=>({})}),...L()})}function re(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 Pe(s)}var P=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=>d.fromJSON(r)),t.graph.nodes.map(r=>xe(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:w,value:A})=>[w,A])),s=re(this.getSchemas(),{variables:r}),o=this.nodes.find(w=>w.type==="start-node")?.id,n={},i=[];for(let[w,A]of this.nodes.entries()){let O=t[w];O&&(O.runtimeNode&&(n[A.id]=O.runtimeNode),i.push(...O.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()])))}},_=class extends F{constructor(t){super(),this._createUnloadedGraph=()=>{throw new Error("WebAgent must be loaded before it can run.")},Object.assign(this,t)}async load(){if(this.portalItem){try{await this.portalItem.load()}catch(s){throw new S("web-agent:load-portal-item","Failed to load portal item",{error:s})}let r=await this.portalItem.fetchData();if(this.sourceJSON=r,!this.portalItem.title)throw new S("web-agent:missing-title","The portal item is missing a title")}if(!this.sourceJSON)throw new S("web-agent:missing-source-json","The source JSON is missing");if(!this.sourceJSON.description)throw new S("web-agent:missing-description","The source JSON is missing a description");let t=P.fromJSON(this.sourceJSON);return await t.load(),this._runtime=t,this.description=this.sourceJSON.description,this.name=this.portalItem?.title??`web-agent-${Date.now()}`,this.generate(),this}generate(){if(!this._runtime){this.workspace=re([]),this.createGraph=this._createUnloadedGraph;return}let{createGraph:t,workspace:r}=this._runtime.generate();this.workspace=r,this.createGraph=t}},k=class extends R{static{this.properties={agent:0,context:0,itemId:1,workflow:0}}#e;async getContext(){return W(this.context)?await this.context():this.context}async load(){let t;if(this.itemId){let r=se.getDefault();t=new _({portalItem:new oe({id:this.itemId,portal:r})})}else this.workflow&&(t=new _({sourceJSON:this.workflow}));if(t&&(await t.load(),this.agent=t),!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()}};D("arcgis-assistant-agent",k);return k},"portal/PortalItem","portal/Portal","core/Error","core/Accessor","core/accessorSupport/decorators")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as s}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as s}from"./2NOLMOEP.js";import"./5INBG23U.js";import{C as r,g as e,h as t,x as i}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var c=e`:host{display:block;min-width:0}.container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 15%,var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;max-width:100%;min-width:0;margin-left:auto;justify-content:flex-end}.container>div:first-child{min-width:0}.avatar{display:flex;align-items:center;justify-content:center}.content{min-width:0;overflow-wrap:anywhere;>*{margin:0}>*+*{margin-block-start:var(--calcite-spacing-sm)}:is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}>calcite-table{display:block;max-width:100%}pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}}@container (min-width: 480px){.container{max-width:80%}}`,a=class extends i{constructor(){super(...arguments),this.userAvatarEnabled=!1}static{this.properties={content:1,user:1,message:0,userAvatarEnabled:5}}static{this.styles=c}_getContent(){return this.message?.role==="user"?this.message.content:this.content}render(){return t`<div class="container"><div><slot name=content><div class="content">${s(this._getContent())}</div></slot></div>${this.userAvatarEnabled?t`<slot name=icon><div class="avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></slot>`:null}</div>`}};r("arcgis-assistant-user-message",a);export{a as ArcgisAssistantUserMessage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a}from"./QBZP6XOE.js";import{Ga as n}from"./A4ZVCRVF.js";import{N as e}from"./N2GN5WOI.js";export default $arcgis.t(([m])=>{async function r(t){let o=new m({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await t.goTo(o),{text:"Successfully zoomed to world extent"}}async function s(t,o){let{mapView:i}=a(o,["mapView"]);return await r(i)}var c=e.object({}),u=n(s,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:c});return u},"geometry/Extent")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as c}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as c}from"./ZUKM4DGB.js";import"./FIZMK7GS.js";import"./SUMXIUIS.js";import"./PR4VMSKD.js";import{C as p,g as i,h as s,o as r,x as a}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var l=i`:host{display:block;max-width:100%}.group{max-width:100%}.prompt{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;cursor:pointer;font-weight:var(--calcite-font-weight-regular)}calcite-chip{max-width:100%}`,e=class extends a{constructor(){super(...arguments),this._messages=c({blocking:!0}),this.prompts=[],this.arcgisPromptSelect=r()}static{this.properties={label:1,prompts:0}}static{this.styles=l}_emitPromptSelect(t){this.arcgisPromptSelect.emit({prompt:t})}render(){return this.prompts.length?s`<calcite-chip-group class="group" .label=${this.label??this._messages.suggestedPromptsLabel}>${this.prompts.map(t=>s`<calcite-chip .value=${t} .label=${t} appearance=outline-fill kind=brand @calciteChipSelect=${()=>this._emitPromptSelect(t)}><div class="prompt">${t}</div></calcite-chip>`)}</calcite-chip-group>`:null}};p("arcgis-assistant-suggested-prompts",e);export{e as ArcgisAssistantSuggestedPrompts};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.js";var e=`## ArcgisKnowledge Agent - Lucene Generation for Graph Search
|
|
3
3
|
|
|
4
4
|
You are an assistant that generates a lucene query for graph query searching.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import b from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import b from"./2H32MDP2.js";import{a as O,b as C}from"./OPQCY33W.js";import{b as x}from"./QAVDW7A7.js";import a from"./BMVPOFHU.js";import{a as L}from"./QBZP6XOE.js";import{a as e}from"./GS5JDPZH.js";import{Ga as T}from"./A4ZVCRVF.js";export default $arcgis.t(([{a:p,b:g,c:b,d:v,e:R,f:j},{c:N}])=>{var w=25,W=i=>i.flatMap(r=>r.split(",")).map(r=>r.trim()).map(r=>r.split(/\s+/u)[0]?.replace(/^"|"$/gu,"")).filter(r=>!!r),B=async(i,r,t,l)=>{let o=r.map?.allLayers.find(u=>u.id===i.layerId),d=await r.whenLayerView(o),f=o.title??i.layerId,h;if(t){let u=await v(t,r);if("error"in u){let s={error:u.error};if(b(t)){let c=r.map?.allLayers.find(y=>y.id===t.layerId);s.geometryLayerName=c?.title??c?.id,s.geometryLayerId=t.layerId,s.geometryWhere=t.where}else g(t)&&(s.point=t.point);return{tool:"queryFeatures",layerName:f,summary:"Geometry lookup failed",details:s}}if(!u.geometry){let s={};if(b(t)){let c=r.map?.allLayers.find(y=>y.id===t.layerId);s.error=`No features found matching: ${t.where}`,s.geometryLayerName=c?.title??c?.id,s.geometryLayerId=t.layerId,s.geometryWhere=t.where}else g(t)&&(s.error="Failed to create point geometry",s.point=t.point);return{tool:"queryFeatures",layerName:f,summary:"No features found for geometry filter",details:s}}h=u.geometry}else l&&(h=r.extent.clone());let E=[...new Set([...i.outFields,...W(i.orderByFields)])],F=O(d,E,l??!1),I=o.objectIdField,a=o.createQuery();a.where=C(o.definitionExpression,i.where||"1=1"),a.outFields=i.outFields.includes("*")?["*"]:[...new Set([...i.outFields,I])],a.orderByFields=i.orderByFields,h&&(a.geometry=h,a.spatialRelationship="intersects"),t?.distance&&(a.distance=t.distance),t?.units&&(a.units=t.units),a.outSpatialReference=r.spatialReference;let n,m;try{n=F?await d.queryFeatureCount(a):await o.queryFeatureCount(a),n>0&&n<=w&&(m=F?await d.queryFeatures(a):await o.queryFeatures(a))}catch(u){console.warn("Client-side query failed, falling back to server:",u),n=await o.queryFeatureCount(a),n>0&&n<=w&&(m=await o.queryFeatures(a))}let{objectIds:q,attributes:S}=m?N(o,m,r.timeZone):{objectIds:void 0,attributes:void 0},k=x(i.outFields,o.fields.map(u=>u.name));return{tool:"queryFeatures",layerName:f,summary:`${n} features found`,details:{totalCount:n,where:i.where,orderByFields:i.orderByFields,outFields:k,...q&&{objectIds:q,objectIdField:I},...S&&{attributes:S},...n>w&&{note:`${n} features found.`}}}};async function U({targetLayer:i,geometryFilter:r,useCurrentExtent:t},l){let{mapView:o}=L(l,["mapView"]),d=j(r,l.state?.agentExecutionContext?.sharedResources),f=await B(i,o,d,t);return JSON.stringify(f,null,2)}var D=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:p.optional().describe("The units for the distance buffer.")}),A=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:p.optional().describe("The units for the distance buffer.")}),G=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer containing the field from which to get a value."),where:e.string().describe("SQL-92 where clause. IMPORTANT: When using geometryFilter.point or geometryFilter.sharedResourceId for point-in-polygon queries, set this to '1=1' to return all features that intersect the point. Only add attribute filters if the user specifically requests them in addition to the spatial query."),orderByFields:e.array(e.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:e.array(e.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryFilter:e.union([D,A,R]).optional().describe("Geometry filter for spatial queries. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location. Use 'point' for inline coordinates or 'layerId/where' for features from another layer."),useCurrentExtent:e.boolean().optional().describe("Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at', OR when the user refers back to features previously identified using the current extent (e.g. 'these', 'those', 'them', 'the same ones'). Default is false (queries entire layer).")}),X=T(U,{name:"queryFeatures",description:`Queries features from a layer. Returns the total count of matching features, plus individual feature attributes if \u226425 features match.
|
|
3
3
|
|
|
4
4
|
USE THIS TOOL FOR:
|
|
5
5
|
- "Show / display / list features where..." \u2014 finding and listing features
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as c,b as o}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as c,b as o}from"./2NOLMOEP.js";import"./5INBG23U.js";import{C as i,g as e,h as t,x as r}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var n=e`.container{color:var(--calcite-color-text-1);min-width:0}.content{min-width:0;overflow-wrap:anywhere}.content>*{margin:0}.content>*+*{margin-block-start:var(--calcite-spacing-sm)}.content :is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}.content>calcite-table{display:block;max-width:100%}.content pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}.content pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}.part{animation:part-reveal calc(3 * var(--calcite-animation-timing)) ease-out}@keyframes part-reveal{0%{opacity:0;transform:translateY(var(--calcite-size-fixed-xxs))}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.part{animation:none}}`,a=class extends r{static{this.properties={content:1,parts:[1,{type:Array}]}}static{this.styles=n}render(){return t`<div class="container"><div class="content">${this.parts?.map(s=>t`<span class="part">${o(s)}</span>`)??c(this.content)}</div></div>`}};i("arcgis-assistant-message-text",a);export{a as ArcgisAssistantMessageText};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
var a=new Map([["clearFilters",async()=>(await import("./EUIURCPS.js")).clearFiltersTool],["resetMap",async()=>(await import("./AO42IPOX.js")).resetMapTool],["setFeatureEffect",async()=>(await import("./24KEZCPF.js").then(m=>m.default.then(e=>({setFeatureEffectTool:e})))).setFeatureEffectTool],["listLayerFields",async()=>(await import("./BWUQRZPK.js")).listLayerFieldsTool],["goToAddress",async()=>(await import("./KRPPMEOF.js").then(m=>m.default.then(e=>({goToAddressTool:e})))).goToAddressTool],["goToBookmark",async()=>(await import("./SG6PAUVR.js")).goToBookmarkTool],["goToFeatures",async()=>(await import("./AY2ZONWQ.js")).goToFeaturesTool],["goToFullExtent",async()=>(await import("./ZVVNATCX.js").then(m=>m.default.then(e=>({goToFullExtentTool:e})))).goToFullExtentTool],["goToHomeExtent",async()=>(await import("./SW3D6QD4.js")).goToHomeExtentTool],["goToLayer",async()=>(await import("./2PGZDONH.js")).goToLayerTool],["goToScale",async()=>(await import("./MYLY2ABI.js")).goToScaleTool],["goToViewpoint",async()=>(await import("./D7FEOAW3.js").then(m=>m.default.then(e=>({goToViewpointTool:e})))).goToViewpointTool],["goToZoom",async()=>(await import("./IH5P2PWJ.js")).goToZoomTool],["findRelevantFields",async()=>(await import("./VU7IOGNS.js").then(m=>m.default.then(e=>({findRelevantFieldsTool:e})))).findRelevantFieldsTool],["findRelevantLayers",async()=>(await import("./OMUWBY75.js")).findRelevantLayersTool],["listSharedResources",async()=>(await import("./KURNYULZ.js")).listSharedResourcesTool],["getAttribute",async()=>(await import("./RNJ7T5GF.js").then(m=>m.default.then(e=>({getAttributeTool:e})))).getAttributeTool],["getStatistics",async()=>(await import("./WOL5YMJ2.js").then(m=>m.default.then(e=>({getStatisticsTool:e})))).getStatisticsTool],["getTopFeatures",async()=>(await import("./I37ZJHTM.js").then(m=>m.default.then(e=>({getTopFeaturesTool:e})))).getTopFeaturesTool],["queryFeatures",async()=>(await import("./EKMCGN6R.js").then(m=>m.default.then(e=>({queryFeaturesTool:e})))).queryFeaturesTool]]);async function e(o){let t=a.get(o);if(!t)throw new Error(`"${o}" tool not found`);return await t()}export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
var I={updatedAt:"2026-10-07",models:{"gpt-6-astra":{input:10,cachedInput:1,cacheWrite:12.5,output:50,longContext:{aboveInputTokens:272e3,input:20,cachedInput:2,cacheWrite:25,output:75}},"gpt-6-sol":{input:2,cachedInput:.2,cacheWrite:2.5,output:10,longContext:{aboveInputTokens:272e3,input:4,cachedInput:.4,cacheWrite:5,output:15}},"gpt-6-luna":{input:.1,cachedInput:.01,cacheWrite:.125,output:.5,longContext:{aboveInputTokens:272e3,input:.2,cachedInput:.02,cacheWrite:.25,output:.75}}}};function m(u,p){let e=u.metadata?.tokenUsage,a=u.metadata?.model,n=a&&Object.hasOwn(p.models,a)?p.models[a]:void 0;if(u.type!=="model"||!e||!n)return;let c=e.cacheRead??0,o=e.cacheWrite??0,t=n.longContext&&e.input>n.longContext.aboveInputTokens?n.longContext:n;if(c>0&&t.cachedInput===void 0||o>0&&t.cacheWrite===void 0||![e.input,e.output,c,o,t.input,t.cachedInput??0,t.cacheWrite??0,t.output].every(h=>Number.isFinite(h)&&h>=0)||c+o>e.input)return;let i=(e.input-c-o)*t.input/1e6,r=c*(t.cachedInput??0)/1e6,d=o*(t.cacheWrite??0)/1e6,s=e.output*t.output/1e6;return{input:i,cachedInput:r,cacheWrite:d,output:s,total:i+r+d+s,rates:t}}var l=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:6});function g(u){return u===void 0?"Unavailable":u>0&&u<1e-6?"< $0.000001":`~${l.format(u)}`}export{I as a,m as b,g as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as R}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as R}from"./QBZP6XOE.js";import{a as g}from"./CETIZ4IQ.js";import{a as m}from"./GS5JDPZH.js";import{Ga as q}from"./A4ZVCRVF.js";import"./N2GN5WOI.js";import"./272R36XK.js";import"./5PV2GUZW.js";export default $arcgis.t(([C,x])=>{var L=10,N=["string","small-integer","integer"],$=async(i,e,{includeSummaryStatistics:o=!0,includeUniqueValues:u=!0}={})=>{let r=null,a=null;try{if(e.type!=="geometry"&&e.type!=="oid"&&e.type!=="global-id"){o&&(r=await C({layer:i,field:e.name}));let s=e.domain?.type==="coded-value"?e.domain:null;u&&(N.includes(e.type)||s)&&(a=(await x({layer:i,field:e.name})).uniqueValueInfos.sort((n,d)=>d.count-n.count).slice(0,L),s&&(a=a.map(n=>({...n,value:s.getName(n.value)??n.value}))))}}catch(s){console.error(`Error fetching statistics for field ${e.name}:`,s)}return{summaryStatistics:r,uniqueValues:a}};function A(i,e){return["string","small-integer","integer"].includes(i)||e==="coded-value"}async function V(i,e,o,u=!0){let r=[],a=[],s=[];for(let n of i){let d=function(c){let t=e.get(c)?.layerItem;return t?[t.name&&`Name: ${t.name}`,t.title&&`Title: ${t.title}`,t.description&&`Description: ${t.description}`].filter(Boolean).join(" | "):c},{layerId:l,results:y}=n,S=o.map?.allLayers.find(c=>c.id===l),v=e.get(l)?.fieldRegistry;if(!v)continue;let f=r.find(c=>c.layerId===l);f||(f={layerId:l,layerSummary:d(l),fieldInfos:[]},r.push(f));for(let c of y){let t=v.get(c.name);if(!t)continue;let p=t.statistics,b=u&&!p?.summaryStatistics,w=A(t.type,t.domain?.type)&&!p?.uniqueValues,I=b||w;if(s.push({layerId:l,fieldName:t.name,didFetchStatistics:I}),I){let k=$(S,t,{includeSummaryStatistics:b,includeUniqueValues:w}).then(F=>{let h={summaryStatistics:p?.summaryStatistics??null,uniqueValues:p?.uniqueValues??null};b&&(h.summaryStatistics=F.summaryStatistics),w&&(h.uniqueValues=F.uniqueValues),v.set(t.name,{...t,statistics:h}),t.statistics=h});a.push(k)}f.fieldInfos.push(t)}}return await Promise.all(a),{layerFieldInfo:r,didFetchStatistics:a.length>0,fieldStatisticsFetchStatus:s}}var D=.7,j=10;async function T(i){let{query:e,layerIds:o,includeSummaryStatistics:u=!1,fieldSearch:r,layersAndFieldsRegistry:a,embeddingCache:s,mapView:n,minScore:d=D,topResults:l=j}=i,y=await r.searchFields({text:e,layerIds:o,minScore:d,topResults:l,embeddingCache:s}),S=await V(y,a,n,u);return{matches:y,...S}}var U=m.object({query:m.string().describe("A concise semantic description of the fields relevant to the user's task."),layerIds:m.array(m.string()).min(1).describe("Layer IDs returned by findRelevantLayers, restricted to layers relevant to the current task."),includeSummaryStatistics:m.boolean().optional().default(!1).describe("Set to true only when the task directly asks for numeric summaries such as average, minimum, maximum, total, variance, or range.")});async function B(i,e){let{mapView:o}=R(e,["mapView"]),u=await T({...i,fieldSearch:g(e,"fieldSearch"),layersAndFieldsRegistry:g(e,"layersAndFieldsRegistry"),embeddingCache:g(e,"embeddingCache"),mapView:o});return JSON.stringify(u,null,2)}var M=q(B,{name:"findRelevantFields",description:"Finds relevant fields within candidate layers. Returns ranked matches, field metadata, categorical values, and optional numeric summary statistics. Call findRelevantLayers first when layer IDs are not already known.",schema:U});return M},"smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues")
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as e}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as e}from"./2NOLMOEP.js";import"./5INBG23U.js";import{C as s,g as o,h as r,x as c}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var n=o`.container{border-radius:var(--calcite-border-radius);margin-bottom:var(--calcite-spacing-md)}.block{margin:0;background-color:var(--calcite-color-foreground-1);width:100%;max-height:300px;overflow:auto}.entry{margin-left:var(--calcite-spacing-sm);padding:var(--calcite-spacing-xxs) var(--calcite-spacing-lg);border-left:1px solid var(--calcite-color-border-1)}`,i=class extends c{constructor(){super(...arguments),this.logEnabled=!1,this.showLog=!1}static{this.properties={logEnabled:5,showLog:5,log:[1,{type:Array}]}}static{this.styles=n}render(){return this.log?.length&&this.showLog&&this.logEnabled?r`<div class="container"><div class="block"><calcite-accordion appearance=transparent icon-position=start icon-type=chevron scale=s>${this.log.map(a=>{let t=a.includes(`
|
|
3
3
|
`)||a.length>70;return r`<calcite-accordion-item .heading=${t?`${a.substring(0,70)}...`:a} .expanded=${t}><div class="entry">${t?e(a):null}</div></calcite-accordion-item>`})}</calcite-accordion></div></div>`:null}};s("arcgis-assistant-message-log",i);export{i as ArcgisAssistantMessageLog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{c as a}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{c as a}from"./SUMXIUIS.js";import{D as s}from"./NAVK5JJ2.js";var r=/^\.\/assets\/[^/]+\/t9n$/u,h=e=>{let t=e?.configurable;if(t&&typeof t=="object"&&"locale"in t){let o=t.locale;if(typeof o=="string")return o}return"en"};async function d(e){if(!r.test(e.path))throw new Error(`Invalid localization asset path: ${e.path}`);return await a(e.locale,s(e.path),"messages.")}export{h as a,d as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{d as c}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{d as c}from"./XLHYQNAM.js";import{S as r}from"./7GDMXAF5.js";var a=new Set(["agentExecutionContext","outputMessage","summary","status","sharedResourceAdditions"]);function i(n){let o=[...new Set([...n].filter(e=>a.has(e)))];if(o.length!==0)throw new Error(`custom state cannot define reserved runtime fields: ${o.join(", ")}.`)}function d(n){let o=Object.entries(n);return Object.fromEntries(o.map(([e,t])=>[e,r({reducer:(s,u)=>u,default:()=>t})]))}function f(n={}){i(Object.keys(n));let o=d(n);return r.Root({...o,agentExecutionContext:r({reducer:(e,t)=>({...e,...t}),default:c}),outputMessage:r({reducer:(e="",t)=>typeof t=="string"&&t.trim()?t:e,default:()=>""}),summary:r({reducer:(e="",t)=>typeof t=="string"?t:e,default:()=>""}),status:r({reducer:(e,t)=>t??e,default:()=>{}}),sharedResourceAdditions:r({reducer:(e,t)=>t,default:()=>{}})})}function l(n,o=[]){let e=new Set(o);for(let s of n)for(let u of Object.keys(s.shape??{}))e.add(u);let t=Object.fromEntries([...e].map(s=>[s,void 0]));return f(t)}export{i as a,d as b,f as c,l as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
var a={advanced:"gpt-6-astra",default:"gpt-6-sol",fast:"gpt-6-luna"},t={default:"text-embedding-ada-002"};export{a,t as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import b from"./YGSDJ4V3.js";import"./OPQCY33W.js";import"./QAVDW7A7.js";import a from"./BMVPOFHU.js";import"./QBZP6XOE.js";import"./CETIZ4IQ.js";import"./GS5JDPZH.js";import"./A4ZVCRVF.js";import"./N2GN5WOI.js";import"./272R36XK.js";import"./5PV2GUZW.js";export default $arcgis.t(([,a])=>{return a},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as n}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as n}from"./2JD3G7IW.js";import{b as g,c as u}from"./5XZ5VL42.js";import{Y as p,ga as f}from"./272R36XK.js";var d=o=>{let a=new Set;for(let e of o)if(f(e)){let t=e;t.tool_calls&&t.tool_calls.length>0&&t.tool_calls.forEach(r=>{r.id&&a.add(r.id)})}return o.filter(e=>{if(p(e)){let t=e;return a.has(t.tool_call_id)}return!0})},c=(o,a)=>{let e=g.fromTemplate(o);return u.fromMessages([e,...a])},h=async o=>{let{promptText:a,modelTier:e,messages:t,config:r}=o,i=c(a,t??[]),s=await n({modelTier:e,config:r});return i.pipe(s)},v=async o=>{let{promptText:a,modelTier:e="default",messages:t,inputVariables:r,config:i}=o,s=await(await h({promptText:a,modelTier:e,messages:t,config:i})).invoke(r??{},i);return typeof s=="string"?s:s.text},y=async o=>{let{promptText:a,modelTier:e="default",messages:t,inputVariables:r,schema:i,config:s}=o,l=c(a,t??[]),m=(await n({modelTier:e,config:s})).withStructuredOutput(i);return await l.pipe(m).invoke(r??{},s)},M=async o=>{let{promptText:a,modelTier:e="default",messages:t,inputVariables:r,tools:i,config:s}=o,l=i.length>0?d(t??[]):t??[],m=c(a,l),T=await n({modelTier:e,config:s});return await m.pipe(T.bindTools(i)).invoke(r??{},s)};export{v as a,y as b,M as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.js";var e=`# ArcGIS Online Map Viewer \u2014 Smart Mapping Assistant
|
|
3
3
|
|
|
4
4
|
You are a Smart Mapping Assistant for ArcGIS Online Map Viewer.
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as c}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as c}from"./QBZP6XOE.js";import{a as t}from"./GS5JDPZH.js";import{Ga as a}from"./A4ZVCRVF.js";async function i(o,e){return await e.goTo({scale:o}),{text:`Successfully zoomed to: ${o}`}}async function r({scale:o},e){let{mapView:s}=c(e,["mapView"]);return await i(o,s)}var m=t.object({scale:t.number().describe("The map scale of the view to go to.")}),p=a(r,{name:"goToScale",description:"Go to the specified view scale.",schema:m});export{p as a};
|