@arcgis/ai-components 6.0.0-next.1 → 6.0.0-next.3
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 +23 -21
- 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 +11 -11
- 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 +35 -18
- 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/46NXKDIE.js +2 -0
- 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/{JEWJ4M25.js → 5OGABLOF.js} +5 -5
- package/dist/cdn/{UZLQALHY.js → 5PV2GUZW.js} +1 -1
- 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/{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/{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/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/CKDKQVS3.js +2 -0
- package/dist/cdn/{TENUVOFJ.js → COANVCKH.js} +2 -2
- package/dist/cdn/CV5YAJMD.js +2 -0
- package/dist/cdn/{BBB5EJUB.js → CWZG7DML.js} +3 -3
- 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/{RFDMNYTA.js → EWZNZZ5S.js} +2 -2
- 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/G4L7RUTK.js +49 -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/H653UVNH.js +2 -0
- 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/{5REENYPV.js → HTNKDDEV.js} +2 -2
- package/dist/cdn/{6WYVG3JI.js → HU527DML.js} +2 -2
- package/dist/cdn/{DJG6DBCU.js → I2RQZAFF.js} +3 -3
- 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/JZT4ECVH.js +2 -0
- 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/{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/MNMCIS4E.js +15 -0
- package/dist/cdn/{7X22QXJP.js → MR3R5YHQ.js} +2 -2
- package/dist/cdn/{MD2FTKQT.js → MSHEHZYP.js} +3 -3
- 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/OVH4S4ZB.js +3 -0
- 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/{XEJFVUNQ.js → QAVDW7A7.js} +1 -1
- package/dist/cdn/{ONQ6JSBJ.js → QBZP6XOE.js} +1 -1
- package/dist/cdn/RNJ7T5GF.js +2 -0
- package/dist/cdn/{YBWRFVA6.js → RQYDIQVD.js} +3 -3
- package/dist/cdn/{BMPBJXD7.js → S6OUM5X2.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/TZQ6XEKW.js +2 -0
- 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/{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/YIF2OD6F.js +2 -0
- 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/{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 +7 -11
- 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 +19 -108
- 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 +101 -101
- package/dist/components/arcgis-assistant/types.d.ts +2 -0
- 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.d.ts +6 -0
- package/dist/components/arcgis-assistant-interrupt/customElement.js +25 -24
- 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/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +2 -2
- 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.d.ts +6 -0
- package/dist/orchestrator/types.js +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +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/6PK2UPG3.js +0 -2
- package/dist/cdn/74CVYM72.js +0 -19
- package/dist/cdn/7HVIVV3O.js +0 -2
- package/dist/cdn/7MCFHVEH.js +0 -3
- 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/HWIM4KWF.js +0 -2
- package/dist/cdn/KKWCHNYQ.js +0 -2
- package/dist/cdn/KX6CZEVZ.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/OT5ECP4V.js +0 -138
- 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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import p from"./CWZG7DML.js";import{a as i,c as r}from"./NYFL2F5L.js";import"./YD5LVM7V.js";import n from"./AOT3PM2Q.js";import m from"./YGSDJ4V3.js";import l from"./M52LKZN7.js";import k from"./UXDRYDOD.js";import j from"./2H32MDP2.js";import"./OPQCY33W.js";import"./QAVDW7A7.js";import h from"./YSEHJQ4L.js";import g from"./CV5YAJMD.js";import"./OKDXM5D4.js";import f from"./UP7RW5K2.js";import"./M5UMOOL2.js";import"./H6J65TWL.js";import"./XBWGOD6I.js";import d from"./J3T5HB77.js";import"./AGDGDULE.js";import"./FIZMK7GS.js";import"./LMAIOLS2.js";import"./7OQK2F7O.js";import c from"./Y3ZKMD47.js";import b from"./BMVPOFHU.js";import"./QBZP6XOE.js";import"./3COVQI26.js";import"./CETIZ4IQ.js";import"./PR4VMSKD.js";import"./X3YFCWQZ.js";import"./2JD3G7IW.js";import"./LDDP7NSY.js";import"./WHIWOYHN.js";import{C as a,x as e}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import{a as o}from"./I2RQZAFF.js";import"./H653UVNH.js";import"./GS5JDPZH.js";import"./2WY5MPMY.js";import"./S6OUM5X2.js";import"./XLHYQNAM.js";import"./7GDMXAF5.js";import"./5XZ5VL42.js";import"./C3VLDYS2.js";import"./A4ZVCRVF.js";import"./N2GN5WOI.js";import"./272R36XK.js";import"./5PV2GUZW.js";export default $arcgis.t(([])=>{var n=[async()=>(await import("./KDA5VPLO.js")).default,async()=>(await import("./LGIXZLOP.js")).default],s=o({id:"data-exploration",name:"Data Exploration Agent",description:"Explores feature-layer data and applies data-driven map filters using on-demand query and filter skills.",skillLoaders:n,modelTier:"default",systemPrompt:"You are an ArcGIS data exploration agent.",instructions:"Answer only questions about the current map's layers, features, fields, spatial relationships, or supported map actions, using returned tool results. Do not answer unrelated general-knowledge, advice, opinion, political, health, security, or other non-map requests, even when the user asks for this agent. For an unsupported request, respond only: 'I can help with questions about the data and features in this map.' Report directly relevant findings, requested calculations, and limitations that affect the answer. Do not provide unsolicited advice about dataset design, publishing, classification, grouping, future analysis, or alternative questions. Ask a clarifying question only when a map-related request cannot be answered reliably as written. A request can require both query and filter skills. Treat show, display, highlight, map, filter, reveal, emphasize, include, or exclude as visual map intent when the request targets matching features. For visual map intent, do not stop after query. First use query to identify/count the matching features, then load the filter skill and call setFeatureEffect with the same layer, where clause, geometry filter, extent setting, or object IDs. Use only tool results to describe data or map changes."});var t=class extends e{constructor(){super(...arguments),this.agent=s}static{this.properties={referenceElement:1}}#t;#e;getContext(){if(!this.#t)throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=i(this,"arcgis-assistant-data-exploration-agent"),this.#e=r(this)}disconnectedCallback(){this.#e?.unregister(this.agent.id),super.disconnectedCallback()}};a("arcgis-assistant-data-exploration-agent",t);return t},"intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/knowledgeGraphService",b,c,d,f,g,h,j,k,l,m,n,p)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as w}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as w}from"./YGI277SH.js";import{a as r,f as o,h as x}from"./T2OYUOSO.js";import{a as b,c as S}from"./VINKTQFR.js";import{A as v,C as f,g,h as n,o as c,x as $}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var R=g`:host{display:block;min-width:0}.span-title.completed{color:var(--calcite-color-status-success)}.span-title.failed{color:var(--calcite-color-status-danger)}.span-title.interrupted{color:var(--calcite-color-status-warning)}.span-title.running{color:var(--calcite-color-status-info)}.duration{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm);min-width:3.4rem;text-align:right;font-variant-numeric:tabular-nums}.span-title{display:inline-flex;align-items:center;gap:var(--calcite-spacing-xxs)}.span-title>span{color:var(--calcite-color-text-1);overflow-wrap:anywhere}`,p=class extends ${constructor(){super(...arguments),this.events=[],this.pricing=b,this.arcgisInternalSpanSelect=c(),this.arcgisInternalRunSelect=c()}static{this.properties={events:0,run:0,pricing:0,selectedSpanId:1}}static{this.styles=R}#t;willUpdate(t){(!this.hasUpdated||t.has("run")||t.has("events")||t.has("pricing"))&&(this.#t=this.run??w(this.events,this.pricing).runs[0])}renderSpan(t,a){let s=a.get(t.id)??[];return n`<calcite-tree-item .label=${t.label} data-span-id=${t.id??v} .selected=${t.id===this.selectedSpanId} .expanded=${s.length>0}><span class=${`span-title ${t.status}`}><calcite-icon .icon=${r[t.status]} scale=s></calcite-icon><span>${t.label}</span></span><span class="duration" slot=actions-end>${o(t)}</span>${s.length?n`<calcite-tree slot=children lines scale=s selection-mode=single>${s.map(l=>this.renderSpan(l,a))}</calcite-tree>`:null}</calcite-tree-item>`}render(){let t=this.#t;if(!t)return null;let{visibleSpans:a,childrenByParent:s,rootSpans:l}=x(t.spans),I=t.prompt.length>80?`${t.prompt.slice(0,77)}...`:t.prompt,i=t.status,k=t.usage.knownTokens.total,d=a.filter(e=>e.status==="failed").length,u=t.usage.cost?.total,m=u===void 0?void 0:S(u);return n`<calcite-block .heading=${I||`Run ${t.number}`} .description=${`${a.length} spans | ${o(t)} | ${k.toLocaleString()} tokens${m===void 0?"":` (${m})`}${d?` | ${d} failed`:""}`} .iconStart=${i==="running"?void 0:r[i]} .label=${`Run ${t.number}: ${i}`} scale=s expandable expanded><calcite-action slot=actions-end icon=information scale=s text="View run details" @click=${e=>{e.stopPropagation(),this.arcgisInternalRunSelect.emit()}}></calcite-action>${i==="running"?n`<calcite-loader slot=content-start inline scale=s .label=${`Run ${t.number} running`}></calcite-loader>`:null}<calcite-tree aria-label=${`Run ${t.number} spans`} lines scale=s selection-mode=children @calciteTreeSelect=${e=>{let h=e.currentTarget.selectedItems[0]?.dataset.spanId;h&&this.arcgisInternalSpanSelect.emit(h)}}>${l.map(e=>this.renderSpan(e,s))}</calcite-tree></calcite-block>`}};f("arcgis-assistant-observation-run",p);export{p as ArcgisAssistantObservationRun};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as k}from"./QBZP6XOE.js";import{Ga as s}from"./A4ZVCRVF.js";import{N as r}from"./N2GN5WOI.js";export default $arcgis.t(([w])=>{async function d(o,e){let t=e.map.bookmarks;if(!t||t.length===0)throw new Error("No bookmarks found in the map.");let n=t.find(h=>h.name===o);if(!n)throw new Error(`Bookmark with name "${o}" not found.`);let a=n.viewpoint;if(!a)throw new Error(`Bookmark with name "${o}" does not have a valid viewpoint.`);let i=a.targetGeometry?.extent;if(!i)throw new Error(`Bookmark with name "${o}" does not have a valid target geometry.`);let c=w.fromExtent(i);await e.goTo(a);let m=`Navigated to bookmark: ${o}`,f={value:m,sharedResourceAdditions:[{kind:"polygon",description:`Bookmark: ${o}`,payload:c.toJSON()}]};return[m,f]}async function p({bookmarkName:o},e){let{mapView:t}=k(e,["mapView"]);return await d(o,t)}var g=r.object({bookmarkName:r.string().describe("The name of the bookmark to navigate to.")}),y=s(p,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:g,responseFormat:"content-and-artifact"});return y},"geometry/Polygon")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import f from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import f from"./AOT3PM2Q.js";import e from"./YGSDJ4V3.js";import c from"./M52LKZN7.js";import a from"./UXDRYDOD.js";import{b as me}from"./X3YFCWQZ.js";import{a as d}from"./GS5JDPZH.js";import{a as b,b as T}from"./2WY5MPMY.js";import{e as x,f as le}from"./XLHYQNAM.js";import{S as y,g as ne,j as P,k as L,la as se,y as ie,ya as k}from"./7GDMXAF5.js";import{Ga as g}from"./A4ZVCRVF.js";import{R,V as K,ga as I}from"./272R36XK.js";export default $arcgis.t(([{createRenderer:je},{getSchemesByTag:Fe,getSchemes:Ge},{getBackgroundColorTheme:be},{createAgeRenderer:Qe,createContinuousRenderer:Ve},{getSchemesByTag:H},{createContinuousRenderer:Ke},{createRenderer:Be},{getSchemesByTag:Ue},{createRenderer:He},{getSchemesByTag:Je},{createRenderer:We},{getSchemesByTag:Xe},{createRenderer:Ze},{getSchemesByTag:Ye},{createAgeRenderer:et,createContinuousRenderer:tt},{createRenderer:rt},{getSchemesByTag:ot},$,nr,Ee,Me,{fetchKnowledgeGraph:ve,executeQueryStreaming:ir,executeSearchStreaming:sr},lr,Se,xe,{getBindParametersFromCypherQuery:cr},pe,ue,de,ce])=>{var E=(e,t)=>t??e;var Hr=y.Root({...le(),intent:y({reducer:E}),vectorSearchLayerResults:y({reducer:E,default:()=>[]}),vectorSearchFieldResults:y({reducer:E}),navigationInternalState:y({reducer:E,default:()=>({toolCallMessage:void 0})})});var ge=e=>Array.isArray(e)&&e.every(R),qe=e=>typeof e=="object"&&e!=null&&"messages"in e&&ge(e.messages),ze=e=>typeof e=="object"&&e!=null&&"lg_tool_call"in e,O=class extends se{tools;handleToolErrors=!0;trace=!1;constructor(e,t){let{name:r,tags:o,handleToolErrors:a}=t??{};super({name:r,tags:o,func:(n,s)=>this.run(n,s)}),this.tools=e,this.handleToolErrors=a??this.handleToolErrors}async runTool(e,t,r){let o=this.tools.find(a=>a.name===e.name);try{if(o===void 0)throw new Error(`Tool "${e.name}" not found.`);let a={...e,type:"tool_call"},n={...t,state:r,toolCallId:e.id??"",config:t,context:t.context,store:t.store??null,writer:t.writer??t.configurable?.writer??null},s=await o.invoke(a,n);return R(s)&&s.getType()==="tool"||L(s)?s:new K({status:"success",name:o.name,content:typeof s=="string"?s:JSON.stringify(s),tool_call_id:e.id})}catch(a){if(!this.handleToolErrors||ie(a))throw a;return new K({status:"error",content:`Error: ${a.message}
|
|
3
3
|
Please fix your mistakes.`,name:e.name,tool_call_id:e.id??""})}}async run(e,t){let r;if(ze(e)){let{lg_tool_call:n,...s}=e;r=[await this.runTool(n,t,s)]}else{let n;if(ge(e))n=e;else if(qe(e))n=e.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let s=new Set(n.filter(c=>c.getType()==="tool").map(c=>c.tool_call_id)),i;for(let c=n.length-1;c>=0;c-=1){let l=n[c];if(I(l)){i=l;break}}if(i==null||!I(i))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(i.tool_calls?.filter(c=>c.id==null||!s.has(c.id)).map(c=>this.runTool(c,t,e))??[])}if(!r.some(L))return Array.isArray(e)?r:{messages:r};let o=[],a=null;for(let n of r)L(n)?n.graph===P.PARENT&&Array.isArray(n.goto)&&n.goto.every(s=>ne(s))?a?a.goto.push(...n.goto):a=new P({graph:P.PARENT,goto:n.goto}):o.push(n):o.push(Array.isArray(e)?[n]:{messages:[n]});return a&&o.push(a),o}};var Po=y.Root({llmInputMessages:y({reducer:(e,t)=>k([],t),default:()=>[]})});var Le=(e,t=300)=>{let r=e.replace(/\s+/gu," ").replace(/[*_`#>\-]/gu,"").trim();return r.length>t?`${r.slice(0,t)}...`:r};var ma=y.Root({...x(),vectorSearchLayerIds:y(),vectorSearchFieldResults:y(),layerFieldInfo:y(),queryResponse:y(),dataExplorationMessages:y({reducer:k,default:()=>[]})}),Oe=[ce,de,ue,pe];var ha=new O(Oe,{handleToolErrors:!1});var we=["mapView"];async function at(e){let{fields:t,layer:r,view:o,styleName:a,colorSchemeTags:n}=e,s;return n?s=Fe({basemapTheme:await be(o),geometryType:r.geometryType,includedTags:n,numColors:Math.min(t.length,8)})[0]:s=Ge({basemapTheme:await be(o),geometryType:r.geometryType,numColors:Math.min(t.length,8)}).primaryScheme,{layer:r,view:o,attributes:t.map(i=>({field:i,label:r.fields.find(c=>c.name===i)?.alias??""})).slice(0,8),outlineOptimizationEnabled:!0,sizeOptimizationEnabled:!0,includeSizeVariable:a.includes("Size"),pieChartScheme:s}}async function nt(e){return await je(e)}async function it({arcgisMap:e,arcgisMapView:t,layerId:r,fields:o,colorSchemes:a,includeSize:n}){let s=t,i=e?.allLayers.find(l=>l.id===r);if(!i)return`Could not find layer for id: ${r}`;let c={styleName:n?"chart-size":"chart",fields:o,layer:i,view:s,colorSchemeTags:a};try{let l=await at(c),u=await nt(l);return i.renderer=u.renderer,i.visible=!0,`Chart renderer applied to layer: ${i.title??i.id} using fields ${o.join(", ")}`}catch(l){return`Error applying chart renderer: ${l instanceof Error?l.message:String(l)}`}}function v(e){let t=e?.configurable?.context;if(!t||typeof t!="object")throw new Error("LayerStylingAgent context missing");let r=we.filter(o=>!(o in t));if(r.length)throw new Error(`LayerStylingAgent context missing: ${r.join(", ")}`);return t}async function st({layerId:e,fields:t,colorSchemes:r,includeSize:o},a){let{mapView:n}=v(a);return await T({type:"show-legend",data:{layerIds:[e]}},a),await it({arcgisMap:n.map,arcgisMapView:n,layerId:e,fields:t,colorSchemes:r,includeSize:o})}var lt=d.object({layerId:d.string().describe("The id of the layer to apply the chart renderer to"),fields:d.array(d.string()).describe("The fields to use for the chart renderer (multiple numeric fields)"),colorSchemes:d.array(d.string()).optional().describe("Optional color scheme tags to use"),includeSize:d.boolean().optional().describe("Whether to vary the chart size (chart-size)")}),ja=g(st,{name:"chart",description:`Label: Charts
|
|
4
4
|
Description: Show the values of two or more categories as a proportion of the total using a pie chart.
|
|
5
5
|
Keywords: pie, chart, all categories, breakdown, proportion
|
|
@@ -69,7 +69,7 @@ Fields: This typically requires zero or one field of type number.`,schema:Ct});f
|
|
|
69
69
|
Description: Represent features as categories with different symbol colors or shapes. Examples include type of tree, road class, or province name.
|
|
70
70
|
Keywords: categorical, category, type, unique, discrete, point of interest, region, group
|
|
71
71
|
Example: Color each feature based on the region it belongs to
|
|
72
|
-
Fields: This style requires a single field which may be a string, number, or date type. It is usually a string.`,schema:ar}),Xa=y.Root({...x(),vectorSearchLayerIds:y(),vectorSearchFieldResults:y(),layerFieldInfo:y(),selectedLayerId:y()});var rn=y.Root({...x(),helpInternalState:y({reducer:E,default:()=>({toolCallMessage:void 0})})});var Te=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./
|
|
72
|
+
Fields: This style requires a single field which may be a string, number, or date type. It is usually a string.`,schema:ar}),Xa=y.Root({...x(),vectorSearchLayerIds:y(),vectorSearchFieldResults:y(),layerFieldInfo:y(),selectedLayerId:y()});var rn=y.Root({...x(),helpInternalState:y({reducer:E,default:()=>({toolCallMessage:void 0})})});var Te=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./XYMIFFBW.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./AMA67DVI.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_cypher_query_prompt.md":()=>import("./JSRNLNOE.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./UWHRBGWN.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./2HNGMLFD.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./6QOSUG64.js").then(e=>e.default),"../agents/dataExploration/skills/filter/SKILL.md":()=>import("./LGIXZLOP.js").then(e=>e.default),"../agents/dataExploration/skills/query/SKILL.md":()=>import("./KDA5VPLO.js").then(e=>e.default),"../agents/dataExplorationGraph/prompts/data_explore_filter_prompt.md":()=>import("./C5Q6E7UC.js").then(e=>e.default),"../agents/dataExplorationGraph/prompts/data_explore_query_prompt.md":()=>import("./GGAXXX5X.js").then(e=>e.default),"../agents/dataExplorationGraph/prompts/summarize_query_response_prompt.md":()=>import("./G7MCIFV2.js").then(e=>e.default),"../agents/help/skills/help/SKILL.md":()=>import("./MNMCIS4E.js").then(e=>e.default),"../agents/helpGraph/prompts/help_prompt.md":()=>import("./XMQJWPXI.js").then(e=>e.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./X4EQEKM7.js").then(e=>e.default),"../agents/navigation/skills/navigation/SKILL.md":()=>import("./LWEKPFV6.js").then(e=>e.default),"../agents/navigationGraph/prompts/navigation_intent_prompt.md":()=>import("./XSH4B7FP.js").then(e=>e.default),"../agents/navigationGraph/prompts/navigation_tool_prompt.md":()=>import("./HCPI2RJE.js").then(e=>e.default)});async function C(e){let t=Object.entries(Te).find(([r])=>r.endsWith(`/${e}.md`));if(!t)throw new Error(`Prompt not found: ${e}
|
|
73
73
|
Available prompts:
|
|
74
74
|
${Object.keys(Te).join(`
|
|
75
75
|
`)}`);return await t[1]()}var vn=y.Root({...x(),intent:y({reducer:(e,t)=>t}),arcgisKnowledgeMessages:y({reducer:k,default:()=>[]}),arcgisKnowledgeToolResult:y({reducer:(e,t)=>t,default:()=>null})});function oe(e){let t=e.map?.allLayers.filter(r=>r.type==="knowledge-graph");if(!t||t?.length!==1)throw new Error("The Knowledge Agent currently only supports maps with exactly one Knowledge Graph Layer.")}function M(e){return!!e?.map&&"activeLinkChartLayer"in e.map}async function G(e){!M(e)||!e.map.diagramNodesExtent||await e.goTo(e.map.diagramNodesExtent)}function z(e){let t=e?.configurable?.context;if(!t||typeof t!="object")throw new Error("ArcgisKnowledgeAgent context missing");if(!("view"in t))throw new Error("View context missing");let r=t.view;return r.map&&!("activeLinkChartLayer"in r.map)&&oe(r),{view:r}}function Sn(e){let t=e?.configurable?.context;if(ke(e)==="knowledgeGraph")return"knowledgeGraph";let r=t.view;return M(r)?"linkChart":(oe(r),"map")}async function D(e){let t=e?.configurable?.context;if(ke(e)==="knowledgeGraph")return t;{let r=t.view.map;if(r&&"activeLinkChartLayer"in r){let o=r.knowledgeGraph?.url;if(!o)throw new Error("Knowledge graph url missing from link chart.");return{knowledgeGraph:await ve(o)}}else{oe(t.view);let o=(t.view.map?.allLayers.find(a=>a.type==="knowledge-graph")).url;if(!o)throw new Error("Knowledge graph url missing from map.");return{knowledgeGraph:await ve(o)}}}}function ke(e){let t=e?.configurable?.context;if(!t||typeof t!="object")throw new Error("ArcgisKnowledgeAgent context missing");if("knowledgeGraph"in t&&"view"in t)throw new Error("Knowledge Graph context should only have a view or knowledgeGraph, but never both.");if("knowledgeGraph"in t)return"knowledgeGraph";if("view"in t)return"view";throw new Error("ArcgisKnowledgeAgent context must have either a view or knowledgeGraph property.")}var J=class{constructor(t){this.dataModel=t,this.kind="GraphQueryGenerationRequest",this.explainQuery=!0,this.schemaInformation=W.fromDataModel(t)}},W=class e{constructor(){this.schemaType="ArcgisGraphSchema",this.entityTypes=[],this.relationshipTypes=[],this.identifierInfo={mappingInfo:{identifierMapsTo:"UniformPropertyIdentifier",identifierPropertyName:"globalid"}}}static fromDataModel(t){let r=new e;for(let o of t.entityTypes)r.entityTypes.push(q.fromEntityType(o));for(let o of t.relationshipTypes)r.relationshipTypes.push(X.fromRelationshipType(o));return r.identifierInfo={mappingInfo:{identifierMapsTo:dr(t.identifierInfo.identifierMappingInfo.identifierInfoType),identifierPropertyName:t.identifierInfo.identifierMappingInfo.uniformPropertyIdentifier.identifierPropertyName}},r.spatialReference=JSON.parse(JSON.stringify(t.spatialReference)),r}static getDataModelTypesSummary(t){let r=t.entityTypes.map(a=>a.name).join(", "),o=t.relationshipTypes.map(a=>a.name).join(", ");return`Entity Types: ${r}.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{c as n}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{c as n}from"./63OF33IL.js";import{a as d,b as f}from"./3UVQLYUK.js";import{a as h,c as a}from"./S6OUM5X2.js";import{a as g}from"./I724KIFI.js";import{a as l}from"./HU527DML.js";import{d as p}from"./WEBAQIUT.js";import{y as c}from"./7GDMXAF5.js";import{c as i}from"./5XZ5VL42.js";import{V as u}from"./272R36XK.js";var w=class extends l{constructor(t){super(),this.middlewares=[],this.modelTier="default",this._destroyed=!1,Object.assign(this,t),this.generate()}destroy(){if(!this._destroyed){this._destroyed=!0;for(let t of new Set(this.tools))"getTools"in t&&t.destroy()}}generate(){let t=this.prompt?i.fromTemplate(this.prompt).inputVariables:[],o=p([this.inputSchema,this.outputSchema].filter(Boolean),t),e=this.id,s={[e]:this._invoke.bind(this)},r=[{from:e,decide:()=>{}}];this.workspace=o,this.createGraph=()=>g(s,r,o,{agent:this,entryNode:e,middlewares:this.middlewares})}async _invoke(t,o){try{return this.outputSchema?await this._invokeStructured(t,o):await this._invokeUnstructured(t,o)}catch(e){if(c(e)||o?.signal?.aborted||e instanceof Error&&e.name==="AbortError")throw e;let s=e instanceof Error?e.message:String(e);return d({outputMessage:s},"failed",s)}}async _invokeStructured(t,o){if(!this.outputSchema)throw new Error("Output schema is required for structured invocation.");let{createChatModel:e}=await import("./orchestrator/models/chatModel.js"),s=await a({model:await e({modelTier:this.modelTier}),systemPrompt:await this._getPromptWithInputVariables(t),tools:await this._getTools(),checkpointer:!0,middleware:n(this.middlewares),responseFormat:h(this.outputSchema)}).invoke({messages:t.agentExecutionContext.messages},o);if(!("structuredResponse"in s)||s.structuredResponse===void 0)throw new Error("LLMAgent did not receive structured output from createAgent.");return{...f(s.structuredResponse,this.outputSchema,s.messages),sharedResourceAdditions:y(s.messages)}}async _invokeUnstructured(t,o){let{createChatModel:e}=await import("./orchestrator/models/chatModel.js"),s=(await a({model:await e({modelTier:this.modelTier}),systemPrompt:await this._getPromptWithInputVariables(t),tools:await this._getTools(),checkpointer:!0,middleware:n(this.middlewares)}).invoke({messages:t.agentExecutionContext.messages},o)).messages,r=s.at(-1)?.text??"",T=r.trim()||"LLMAgent completed.";return d({agentExecutionContext:{...t.agentExecutionContext,messages:s},outputMessage:r,sharedResourceAdditions:y(s)},"success",T)}async _getPromptWithInputVariables(t){return await i.fromTemplate(this.prompt).format(t)}async _getTools(){return(await Promise.all((this.tools??[]).map(async t=>"getTools"in t?await t.getTools():["getTool"in t?t.getTool():t]))).flat()}};function y(m){let t=[];for(let o of m)if(u.isInstance(o)&&o.status!=="error"){let e=o.artifact;if(typeof e=="object"&&e!==null&&"sharedResourceAdditions"in e){let s=e.sharedResourceAdditions;if(Array.isArray(s))for(let r of s)t.push({kind:r.kind,description:r.description,payload:r.payload})}}return t}export{w as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as l}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as l}from"./ZUKM4DGB.js";import"./FIZMK7GS.js";import"./SUMXIUIS.js";import"./PR4VMSKD.js";import{C as c,g as a,h as e,l as o,v as i,w as n,x as r}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{watch:d}])=>{var g=a`.container{display:flex;align-items:center;width:100%;justify-content:space-between;gap:var(--calcite-spacing-xs)}.start,.end{display:flex;align-items:center;gap:var(--calcite-spacing-xs)}`,t=class extends r{constructor(){super(...arguments),this._messages=l({blocking:!0}),this._endRef=i(),this._showLog=!1,this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1}static{this.properties={_showLog:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,message:0}}static{this.styles=g}loaded(){this.manager.onLifecycle(()=>[d(()=>this._showLog,()=>this._scrollToEnd())])}_scrollToEnd(){requestAnimationFrame(()=>{this._endRef.value?.scrollIntoView({behavior:"smooth",block:"end"})})}_renderCopyButton(){return!this.message?.error&&this.copyEnabled?e`<calcite-action id=action-copy icon=copy-to-clipboard scale=s @click=${async()=>{try{let s=this.message?.content?.trim();s&&await navigator.clipboard.writeText(s)}catch(s){o("warn","assistant-message-footer","Failed to copy text to clipboard",{once:!0,detail:{error:s}})}}} text></calcite-action><calcite-tooltip reference-element=action-copy overlay-positioning=fixed placement=bottom><span>${this._messages.copyButtonLabel}</span></calcite-tooltip>`:null}_renderLogButton(){return this.message?.log?.length&&this.logEnabled?e`<calcite-action id=action-log icon=access-string-results scale=s @click=${()=>this._showLog=!this._showLog} .text=${this._messages.logButtonLabel} .active=${this._showLog}></calcite-action><calcite-tooltip reference-element=action-log overlay-positioning=fixed placement=bottom><span>${this._messages.logButtonLabel}</span></calcite-tooltip>`:null}_renderReadAloudButton(){return e`<arcgis-assistant-message-read-aloud .message=${this.message} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-read-aloud>`}_renderLog(){return e`<arcgis-assistant-message-log .log=${this.message?.log} .showLog=${this._showLog} .logEnabled=${this.logEnabled}></arcgis-assistant-message-log>`}_renderFeedback(){return e`<arcgis-assistant-message-feedback .message=${this.message} .feedbackEnabled=${this.feedbackEnabled}></arcgis-assistant-message-feedback>`}render(){return e`${this._renderLog()}<div class="container"><div class="start">${this._renderCopyButton()}${this._renderLogButton()}${this._renderReadAloudButton()}<slot name=footer-actions-start></slot></div><div class="end"><slot name=footer-actions-end></slot>${this._renderFeedback()}</div></div><div ${n(this._endRef)}></div>`}};c("arcgis-assistant-message-footer",t);return t},"core/reactiveUtils")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import c from"./UXDRYDOD.js";import b from"./2H32MDP2.js";import"./OPQCY33W.js";import"./QAVDW7A7.js";import a from"./BMVPOFHU.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,c)
|
|
@@ -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"./OVH4S4ZB.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"./H653UVNH.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{N as n}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{N as n}from"./N2GN5WOI.js";function c(e){let r=new Set(e.required??[]),o=Object.fromEntries(Object.entries(e.properties).map(([t,i])=>{let a=s(i);return[t,r.has(t)?a:a.optional()]}));for(let t of r)Object.hasOwn(o,t)||(o[t]=n.unknown().refine(i=>i!==void 0));return n.object(o)}function s(e){let r;switch(e.type){case"array":r=n.array(e.items?s(e.items):n.unknown());break;case"boolean":r=n.boolean();break;case"number":r=n.number();break;case"object":r=c({properties:e.properties??{},required:e.required});break;case"string":if(e.enum!==void 0){if(e.enum.length===0)throw new Error("String schema field enum must include at least one value.");r=n.enum(e.enum)}else r=n.string();break}return e.description!==void 0?r.describe(e.description):r}export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.js";var e=`## GIS Agent Orchestrator
|
|
3
|
+
|
|
4
|
+
Select the single best next agent for an ArcGIS Maps SDK for JavaScript system using the latest user request, registered agents, relevant chat history, and prior execution steps.
|
|
5
|
+
|
|
6
|
+
## Output
|
|
7
|
+
|
|
8
|
+
Return an object matching the response schema:
|
|
9
|
+
|
|
10
|
+
- \`intent\`: the selected registered agent's \`id\`.
|
|
11
|
+
- \`assignedTask\`: a short, actionable task for that agent.
|
|
12
|
+
- \`requiresFollowUp\`: \`true\` when another orchestration step will likely be needed after this agent succeeds; \`false\` when success would complete the user-visible request. This indicates remaining work, not uncertainty.
|
|
13
|
+
|
|
14
|
+
If no registered agent applies, return \`intent: null\`, \`assignedTask: null\`, and \`requiresFollowUp: false\`. If any agent can take a useful next step, select it instead.
|
|
15
|
+
|
|
16
|
+
## Routing Rules
|
|
17
|
+
|
|
18
|
+
- Use each agent's registered name and description together to determine whether it can handle the request.
|
|
19
|
+
- A user naming an agent does not override its registered capabilities.
|
|
20
|
+
- Decide only the next step, not the full workflow. Consider supported actions and available app context, not exact keyword matches.
|
|
21
|
+
- Prefer an agent that can complete the request directly. Route a prerequisite to another agent only when the registered capabilities and provided context establish that it is required and cannot be handled by the completing agent. Do not infer extra steps from a mentioned entity alone. Completing a prerequisite does not complete the original request.
|
|
22
|
+
- Use prior steps to avoid repeating successful work and to retry or adjust failed steps when appropriate.
|
|
23
|
+
|
|
24
|
+
## Task And Context Rules
|
|
25
|
+
|
|
26
|
+
- Preserve the latest request's meaning and constraints exactly. Do not add, remove, infer, or substitute constraints, such as distance versus containment or range versus exact match.
|
|
27
|
+
- Keep \`assignedTask\` concise, directly executable, and close to the user's wording. It may cover only the next necessary part of the request, but must not introduce unsolicited recommendations, implementation or publishing guidance, classification proposals, future analysis, or other work the user did not request.
|
|
28
|
+
- Use only information explicitly present in the request or provided context. Use chat history only when the latest request depends on it; do not carry unrelated earlier constraints forward.
|
|
29
|
+
- For references such as "these", "those", "it", "this location", or "the previous results", including equivalents in other languages, resolve them from the most recent relevant history or successful prior step. Make the assigned task standalone by replacing resolvable references, preserving the referenced constraints, and adding only the latest request's changes. Do not otherwise rewrite the request.
|
|
30
|
+
|
|
31
|
+
## Context
|
|
32
|
+
|
|
33
|
+
### Latest user request
|
|
34
|
+
|
|
35
|
+
{userRequest}
|
|
36
|
+
|
|
37
|
+
### Registered agents
|
|
38
|
+
|
|
39
|
+
Format:
|
|
40
|
+
{{id: string, name: string, description: string}}[]
|
|
41
|
+
|
|
42
|
+
{registeredAgents}
|
|
43
|
+
|
|
44
|
+
### Prior steps
|
|
45
|
+
|
|
46
|
+
Each step contains \`agentId\`, \`assignedTask\`, \`summary\`, and \`status\` (\`"success"\`, \`"failed"\`, or \`"unknown"\`).
|
|
47
|
+
|
|
48
|
+
{priorSteps}
|
|
49
|
+
`;export{e as default};
|
|
@@ -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=`## Task: Summarize Geographic Features
|
|
3
3
|
|
|
4
4
|
You are given features from ArcGIS Feature layer for multiple layers:
|
|
5
5
|
{queryResponse}
|
|
@@ -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 JavaScript SDK FeatureLayerView Query Assistant
|
|
3
3
|
|
|
4
4
|
You are a GIS assistant that generates query parameters for the ArcGIS JavaScript SDK FeatureLayerView \`queryFeatures()\` method.
|
|
5
5
|
|
|
@@ -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"./7JIXXYZR.js";import{a as m,b}from"./ZUKM4DGB.js";import"./FIZMK7GS.js";import"./SUMXIUIS.js";import"./PR4VMSKD.js";import{A as d,C as g,g as l,h as e,x as c}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var p=l`:host{display:block;container-type:inline-size}.container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--calcite-spacing-sm);width:100%;text-align:left}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.content-container{display:flex;flex:1;flex-direction:column;width:100%;min-width:0;gap:var(--calcite-spacing-md)}.content{display:flex;flex-direction:column;min-width:0;gap:var(--calcite-spacing-sm)}.blocks{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.block-pending{display:flex;justify-content:center;align-items:center;padding:var(--calcite-spacing-sm);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 2s ease-in-out infinite;border-radius:var(--calcite-border-radius);min-height:100px}.message-error{font-style:italic}@container (min-width: 480px){.container{max-width:80%}}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.block-pending{animation:none}}`;function u({message:a}){let s=new Map;return a&&a.blocks?.forEach((i,t)=>{if(!i.isPending){let n=r(a.id,t);s.set(n,{data:{block:i,index:t,message:a},name:"block",slotName:n})}}),s}var o=class extends c{constructor(){super(...arguments),this._messages=b({blocking:!0}),this.arcgisSlottableRequest=m(this,["message"],u),this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1,this.footerDisabled=!1,this.assistantAvatarEnabled=!1}static{this.properties={_isStreaming:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,footerDisabled:5,message:0,assistantAvatarEnabled:5}}static{this.styles=p}get _isStreaming(){return!!this.message?.isStreaming}_renderContent(){let s=this.message,i=s?.id;if(i)return e`<div class="content"><arcgis-assistant-interrupt-preview .interrupts=${this.message?.interrupts}></arcgis-assistant-interrupt-preview>${s.blocks?.length?e`<div class="blocks">${s.blocks.map((t,n)=>t.isPending&&t.type!=="text"?e`<div class="block-pending"></div>`:e`<slot name=${r(i,n)??d}></slot>`)}</div>`:null}</div>`}_renderFooter(){return e`<arcgis-assistant-message-footer .message=${this.message} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-footer>`}render(){return e`<div class="container">${this.assistantAvatarEnabled?e`<slot name=icon><calcite-icon icon=effects class="icon" scale=s></calcite-icon></slot>`:null}<div class="content-container"><slot name=content>${this._renderContent()}</slot>${this.message?.error?e`<div class="message-error">${this.message.error}</div>`:null}${this._isStreaming?e`<div class="streaming-indicator"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader></div>`:null}${!this.footerDisabled&&!this._isStreaming?e`<slot name=footer>${this._renderFooter()}</slot>`:null}</div></div>`}};g("arcgis-assistant-message",o);export{o as ArcgisAssistantMessage};
|
|
@@ -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("./JZT4ECVH.js").then(m=>m.default.then(e=>({goToBookmarkTool:e})))).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/
|
|
2
|
-
import{a as i}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as i}from"./QBZP6XOE.js";import{Ga as n}from"./A4ZVCRVF.js";import{N as r}from"./N2GN5WOI.js";async function s(a,t){await t.when();let e=t.map?.allLayers.find(l=>l.id===a);if(!e)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${a}`),{text:`Could not find layer for: ${a}`};let o;return(e.type==="link-chart"||e.type==="knowledge-graph-sublayer")&&t.map?.activeLinkChartLayer?o=t.map.diagramNodesExtent:o=e.fullExtent,o?(await t.goTo(o),e.visible=!0,{text:`Successfully zoomed to: ${e.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function m({layerId:a},t){let{mapView:e}=i(t,["mapView"]);return await s(a,e)}var c=r.object({layerId:r.string().describe("The id of the layer to navigate to")}),p=n(m,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:c});export{p 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=`# Navigation Tool Instructions
|
|
3
3
|
|
|
4
4
|
CRITICAL: You are FORBIDDEN from making multiple tool calls. You MUST make exactly ONE tool call.
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as d}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as d}from"./I724KIFI.js";import{c}from"./WEBAQIUT.js";function i(t){return t?Object.keys(t.shape??{}):[]}function g(t){let e={};for(let s of t)for(let n of i(s))e[n]=void 0;return e}function f(t,e){return Object.fromEntries(e.filter(s=>Object.hasOwn(t,s)).map(s=>[s,t[s]]))}function m(t,e){return`${t.id}_${e}`}function p(t,e){let s=e.inputSchema;return s?{...f(t,i(s)),agentExecutionContext:t.agentExecutionContext,outputMessage:t.outputMessage,sharedResourceAdditions:void 0,status:void 0,summary:""}:{...t,sharedResourceAdditions:void 0,status:void 0,summary:""}}function l(t,e){return t.outputSchema?f(e,i(t.outputSchema)):{}}function x(t){let e={outputMessage:t.outputMessage,status:t.status,summary:t.summary};return t.agentExecutionContext&&(e.agentExecutionContext=t.agentExecutionContext),e}function A(t,e){return async(s,n)=>{let o=await t.run(p(s,t),n),a=l(t,o),r=o.sharedResourceAdditions?.length?[...s.sharedResourceAdditions??[],...o.sharedResourceAdditions]:void 0;return e||o.status==="failed"?{...a,...x(o),...r&&{sharedResourceAdditions:r}}:{...a,outputMessage:o.outputMessage,...r&&{sharedResourceAdditions:r}}}}var h=class{generate({additionalSchemas:e=[]}={}){let s=this.getAgents();this.validateAgents(s);for(let u of s)u.generate();let n=g(e.concat(s.flatMap(u=>[u.inputSchema,u.outputSchema]))),o=c(n),a=this.buildNodes(s),r=this.buildEdges(s);return{workspace:o,createGraph:()=>d(a,r,o,{entryNode:this.getEntryNode(s)})}}buildNodes(e){let s={};for(let[n,o]of e.entries())s[m(o,n)]=A(o,this.isTerminalAgent(e,n));return s}validateAgents(e){if(!e.length)throw new Error("Workflow requires at least one agent.")}};export{i as a,g as b,m as c,h as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as l}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as l}from"./YGI277SH.js";import"./T2OYUOSO.js";import{a as u,c as m}from"./VINKTQFR.js";import{a as g}from"./AGDGDULE.js";import"./FIZMK7GS.js";import"./PR4VMSKD.js";import{C as v,g as h,h as c,l as d,x as p}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var b=h`:host{display:block;container-type:inline-size;min-height:20rem;color:var(--calcite-color-text-1);background:var(--calcite-color-foreground-1)}.observation{position:relative;width:100%;height:100%;min-height:inherit}calcite-shell-panel{--calcite-shell-panel-width: min(40rem, 60cqi);--calcite-shell-panel-max-width: 100cqi}calcite-shell-panel[slot=panel-bottom]{--calcite-shell-panel-min-height: 0px}.runs{min-width:0;min-height:0}.viewer{height:100%}.connection{--calcite-action-text-color: var(--calcite-color-status-danger);--calcite-action-text-color-press: var(--calcite-action-text-color)}.connection.connected{--calcite-action-text-color: var(--calcite-color-status-success)}.empty{padding:var(--calcite-spacing-lg);color:var(--calcite-color-text-3);text-align:center}`,r=class extends p{constructor(){super(),this._connected=!1,this.events=[],this.pricing=u,this.snapshot=l([]),this.listen("calcitePanelClose",t=>{t.stopPropagation(),this._selection=void 0}),this.manager.onLifecycle(()=>(this.#i(),()=>{this.#t?.(),this.#t=void 0,this._connected=!1}))}static{this.properties={_selection:16,_connected:16,events:0,pricing:0,snapshot:0,referenceElement:1}}static{this.styles=b}#e;#t;willUpdate(t){(!this.hasUpdated||t.has("referenceElement"))&&this.#i(),(!this.hasUpdated||t.has("events")||t.has("pricing"))&&(this.snapshot=l(this.events,this.pricing))}async copy(){try{await navigator.clipboard.writeText(JSON.stringify(this.snapshot,null,2))}catch(t){d("warn","assistant-observation-panel","Failed to copy conversation as JSON",{once:!0,detail:{error:t}})}}#i(){if(!this.el.isConnected)return;let t=g(this.el,this.referenceElement);if(!(t===this.#e&&this.#t)){if(this.#t?.(),this.#t=void 0,t!==this.#e&&(this._selection=void 0,this.events=[],this.#e=t),t){let e=n=>{let s=n.detail;this.events.some(({runId:a})=>a===s.runId)||(this._selection={runId:s.runId}),this.events=[...this.events,s]};t.addEventListener("arcgisRuntime",e),this.#t=()=>t.removeEventListener("arcgisRuntime",e)}this._connected=!!this.#t}}render(){let t=this._selection,{runs:e,totals:n}=this.snapshot,s=e.find(i=>i.id===t?.runId),a=s?.spans.find(i=>i.id===t?.spanId),$=s&&t?.spanId===void 0;return c`<calcite-shell class="observation"><calcite-panel class="runs" heading=Runs .description=${`${n.runCount} ${n.runCount===1?"run":"runs"} | ${n.usage.knownTokens.total.toLocaleString()} tokens (${m(n.usage.cost?.total)})`} aria-label="Run history" scale=s><calcite-action slot=header-actions-end icon=copy-to-clipboard text="Copy conversation JSON" title="Copy conversation JSON" .disabled=${!e.length} @click=${this.copy}></calcite-action><calcite-action slot=header-actions-end icon=trash text="Clear runs" .disabled=${!e.length} @click=${()=>{this._selection=void 0,this.events=[]}}></calcite-action><calcite-action slot=header-actions-end class=${`connection${this._connected?" connected":""}`} .icon=${this._connected?"check-circle":"exclamation-mark-circle"} .text=${this._connected?"Connected":"Disconnected"} .title=${this._connected?"Connected":"Disconnected"}></calcite-action>${e.length?null:c`<div class="empty">No runs recorded.</div>`}${e.map(i=>c`<arcgis-assistant-observation-run .run=${i} .selectedSpanId=${i.id===t?.runId?t.spanId:void 0} @arcgisInternalRunSelect=${o=>{o.stopPropagation(),this._selection={runId:i.id}}} @arcgisInternalSpanSelect=${o=>{o.stopPropagation(),this._selection={runId:i.id,spanId:o.detail}}}></arcgis-assistant-observation-run>`)}</calcite-panel>${$||a?c`<calcite-shell-panel slot=panel-end width=l resizable><arcgis-assistant-observation-inspector class="viewer" .span=${a} .run=${s} .pricing=${this.pricing}></arcgis-assistant-observation-inspector></calcite-shell-panel>`:null}</calcite-shell>`}};v("arcgis-assistant-observation-panel",r);export{r as ArcgisAssistantObservationPanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{c as t}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{c as t}from"./WEBAQIUT.js";var r=()=>{throw new Error("createGraph method not implemented.")},s=class{constructor(){this._createGraph=r,this._workspace=t(),this.description=""}_ensureGenerated(){this._createGraph===r&&this.generate()}get id(){return this._id??=this.name.replace(/\s+/gu,"-").toLowerCase()}set id(e){this._id=e}get createGraph(){return this._ensureGenerated(),this._createGraph}set createGraph(e){this._createGraph=e,this._compiledGraph=void 0}get workspace(){return this._ensureGenerated(),this._workspace}set workspace(e){this._workspace=e}get registration(){return{id:this.id,name:this.name,description:this.description,createGraph:this.createGraph,workspace:this.workspace}}async run(e={},a){return this._compiledGraph=this._compiledGraph??this.createGraph().compile(),await this._compiledGraph.invoke(e,a)}};export{s as a};
|
|
@@ -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"./H653UVNH.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)}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import c from"./M52LKZN7.js";import b from"./2H32MDP2.js";import"./OPQCY33W.js";import"./QAVDW7A7.js";import a from"./BMVPOFHU.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,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{Ea as y,a as E,b as p}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{Ea as y,a as E,b as p}from"./7GDMXAF5.js";function x(o,f,t,s={}){let{agent:h,entryNode:l,middlewares:i=[]}=s,r=new y(t);if(Object.keys(o).length===0)throw new Error("Graph requires at least one node.");if(f.length===0)throw new Error("Graph requires at least one edge.");if(i.length>0&&!h)throw new Error("Graph middleware requires agent metadata.");let n=new Set(Object.keys(o)),g=new Map,w=new Map;for(let e of n)g.set(e,0),w.set(e,0);for(let e of f)"to"in e?(n.has(e.from)&&w.set(e.from,(w.get(e.from)??0)+1),n.has(e.to)&&g.set(e.to,(g.get(e.to)??0)+1)):n.has(e.from)&&w.set(e.from,(w.get(e.from)??0)+1);for(let[e,a]of Object.entries(o)){let c=$(h,e,i,async(d,m)=>await Promise.resolve(a(d,m))),u=async(d,m)=>await c(d,m);r=r.addNode(e,u)}for(let e of f)if("to"in e){let a=e.from,c=e.to;if(!n.has(a))throw new Error(`Graph edge references unknown from-node: ${a}`);if(!n.has(c))throw new Error(`Graph edge references unknown to-node: ${c}`);r.addEdge(a,c)}else{let a=e.from;if(!n.has(a))throw new Error(`Graph conditional edge references unknown from-node: ${a}`);r.addConditionalEdges(a,async(c,u)=>{let d=await e.decide(c,u);if(!d)return p;if(!n.has(d))throw new Error(`Graph conditional edge returned unknown node: ${d}`);return d})}let G=N(n,g,l);r.addEdge(E,G);let k=[...n].filter(e=>(w.get(e)??0)===0);for(let e of k)r.addEdge(e,p);return r}function $(o,f,t,s){return!t.length||!o?s:async(h,l)=>await t.reduceRight((i,r)=>async n=>await r.handler(n,i),async i=>{let r=await s(i.state,i.config);return{...i.state,...r}})({agent:o,config:l,nodeName:f,state:h})}function N(o,f,t){if(t){if(!o.has(t))throw new Error(`Graph entry node references unknown node: ${t}`);return t}let s=[...o].filter(h=>(f.get(h)??0)===0);if(s.length!==1)throw new Error(`Graph could not infer a single entry node (found ${s.length}). Provide an explicit entryNode or ensure exactly one node has no incoming edges.`);return s[0]}export{x as a};
|
|
@@ -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 e}from"./GS5JDPZH.js";import{Ga as n}from"./A4ZVCRVF.js";export default $arcgis.t(([m])=>{async function r(t,a,o){let i={target:new m({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return o?.zoom!==void 0&&(i.zoom=o.zoom),o?.scale!==void 0&&(i.scale=o.scale),await a.goTo(i),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,o?.zoom!==void 0?`zoom ${o.zoom}`:"",o?.scale!==void 0?`scale 1:${o.scale}`:""].filter(Boolean).join(", ")}`}}async function s({center:t,zoom:a,scale:o},i){let{mapView:l}=c(i,["mapView"]);return await r(t,l,{zoom:a,scale:o})}var d=e.object({center:e.object({longitude:e.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:e.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:e.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:e.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),g=n(s,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:d});return g},"geometry/Point")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{C as r,g as t,h as e,v as i,w as a,x as n}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{C as r,g as t,h as e,v as i,w as a,x as n}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([l,{when:o,watch:c}])=>{var h=t`.messages-container{display:flex;flex:1;flex-direction:column;line-height:var(--calcite-font-line-height-relative-snug)}.messages-list{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;gap:var(--calcite-spacing-xxl);flex:1 1 auto;min-height:0;justify-content:flex-end;overflow:auto}.end-ref{margin-top:var(--calcite-spacing-lg)}`,s=class extends n{constructor(){super(...arguments),this.#t=i(),this.#s=!1,this.loading=!1,this.messages=new l([]),this.interrupt=null}static{this.properties={loading:5,messages:0,interrupt:0}}static{this.styles=h}#t;#s;firstUpdated(){this.#e()}loaded(){this.manager.onLifecycle(()=>[this.messages.on("change",()=>{this.#e()}),o(()=>!this.loading,()=>{this.#s=!1}),c(()=>[this.loading,this.interrupt],()=>this.#e())])}#e(){requestAnimationFrame(()=>{this.#s||this.#t.value?.scrollIntoView({behavior:"smooth",block:"end"})})}#i(){this.#s=!0}render(){return e`<div class="messages-container" @wheel=${this.#i}><div class="messages-list"><slot name=message-starter></slot><slot name=messages></slot><slot name=message-loading></slot></div><div class="end-ref" ${a(this.#t)}></div></div>`}};r("arcgis-assistant-chat",s);return s},"core/Collection","core/reactiveUtils")
|
|
@@ -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 Knowledge Graph Cypher Rules
|
|
3
3
|
|
|
4
4
|
## GOAL
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
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='---\nname: query\ndescription: Answers questions about feature-layer data, including counts, matching records, field values, aggregates, rankings, and spatially constrained results. Use when the user asks to inspect or summarize map data.\nallowed-tools: listSharedResources findRelevantLayers findRelevantFields getAttribute getStatistics getTopFeatures queryFeatures\n---\n\n# Query\n\n- When the task refers to geometry produced by an earlier agent, call `listSharedResources` with `point`, `polyline` and `polygon` as the requested kinds. If a resource description clearly matches, pass its exact ID as `geometryFilter.sharedResourceId` and use `where: "1=1"` unless the user requests an additional attribute filter. If no resource clearly matches, state that the spatial constraint is unavailable and do not guess geometry.\n- Start with `findRelevantLayers` unless a previous tool result from this run explicitly identifies the relevant layer ID. Use the assigned task as the semantic query.\n- If no relevant layers are returned, explain that no matching map layer was found and stop. Never invent a layer ID.\n- Before querying, call `findRelevantFields` with only relevant layer IDs. Use only the exact field names and categorical values returned by `findRelevantFields`.\n- Set `includeSummaryStatistics` to true when the requested answer directly depends on whole-layer numeric summary statistics such as average, minimum, maximum, sum, variance, standard deviation, null count, or range. Otherwise leave it false and use `getStatistics` later if analysis requires statistics under an attribute or spatial constraint.\n- Use statistics returned by `findRelevantFields` when they directly answer an unfiltered whole-layer question. Use `getStatistics` when a where clause or spatial constraint must be applied.\n- Use `queryFeatures` to count, find, or list matching features. It is the default query tool.\n- Use `getTopFeatures` for highest, lowest, earliest, latest,first, last, or top-N records ranked by an existing field. Display all the features that meet the ranking criteria, including ties at the cutoff value.\n- Use `getAttribute` only when retrieving a particular attribute from a specifically identified feature.\n- Use real field names rather than aliases in SQL-92 where clauses. Use `1=1` when no attribute filter is requested.\n- Set `useCurrentExtent` only when the user explicitly refers to the current view or visible map area.\n- If the request asks to visually show, display, highlight, map, filter, reveal, emphasize, hide, include, or exclude matching features, preserve the information needed for a visual operation in the working context: layer ID, where clause, geometry filter, `useCurrentExtent`, object IDs when available, and count. Preserve the exact values returned or used by tools so another skill can reuse them without repeating discovery.\n- Only answer requests about the current map\'s layers, features, fields, spatial relationships, or supported map actions. Do not use general model knowledge to answer unrelated requests, even when the assigned task or user asks for it. For an unsupported request, respond only: "I can help with questions about the data and features in this map."\n- Answer the assigned question directly. Do not provide unsolicited recommendations about dataset design, publishing, classification, grouping, future analysis, or alternate workflows.\n- Ask for clarification only when the requested result is genuinely ambiguous or cannot be computed reliably from the available layers and fields.\n- Base the final answer only on returned tool data. State failures or empty results directly and do not fabricate values.\n';export{e as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
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"./GS5JDPZH.js";import{W as i}from"./7GDMXAF5.js";import"./5XZ5VL42.js";import"./C3VLDYS2.js";import{Ga as o}from"./A4ZVCRVF.js";import"./N2GN5WOI.js";import"./272R36XK.js";import"./5PV2GUZW.js";var n=["custom","extent","point","polygon","polyline"],u=e.object({id:e.string(),kind:e.enum(n),description:e.string()}),p=e.object({kinds:e.array(e.enum(n)).optional().describe("Optional resource kinds to include. Omit to list all available resources.")}),m=({kinds:r},a)=>{let d=i(a),t=r?new Set(r):void 0,c=(d.agentExecutionContext?.sharedResources??[]).flatMap(l=>{let s=u.safeParse(l);return s.success&&(!t||t.has(s.data.kind))?[s.data]:[]});return JSON.stringify({resources:c},null,2)},h=o(m,{name:"listSharedResources",description:"List IDs, kinds, and descriptions for resources created by earlier agents. Use this to reuse prior results instead of repeating work. Resource payloads are hidden.",schema:p});export{h as listSharedResourcesTool};
|