@arcgis/ai-components 6.0.0-next.0 → 6.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-utils/BaseAgent.js +1 -1
- package/dist/agent-utils/FunctionAgent.js +1 -1
- package/dist/agent-utils/LLMAgent.d.ts +9 -2
- package/dist/agent-utils/LLMAgent.js +46 -37
- package/dist/agent-utils/SkillAgent.js +1 -1
- package/dist/agent-utils/WorkflowAgent.js +1 -1
- package/dist/agent-utils/createSchema.js +1 -1
- package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/agent-utils/middlewares/middleware.js +1 -1
- package/dist/agent-utils/middlewares/trace.js +1 -1
- package/dist/agent-utils/middlewares/types.js +1 -1
- package/dist/agent-utils/tools/FunctionTool.d.ts +12 -1
- package/dist/agent-utils/tools/FunctionTool.js +16 -15
- package/dist/agent-utils/tools/MCPToolProvider.d.ts +54 -0
- package/dist/agent-utils/tools/MCPToolProvider.js +120 -0
- package/dist/agent-utils/tools/ToolProvider.d.ts +13 -0
- package/dist/agent-utils/tools/WebMCPToolProvider.d.ts +37 -0
- package/dist/agent-utils/tools/WebMCPToolProvider.js +71 -0
- package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
- package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
- package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
- package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
- package/dist/agents/agents/arcgisKnowledge/graph/arcgisKnowledgeGraph.js +1 -1
- package/dist/agents/agents/dataExploration/dataExplorationAgent.js +1 -1
- package/dist/agents/agents/dataExplorationGraph/graph/dataExplorationGraph.js +1 -1
- package/dist/agents/agents/help/helpAgent.js +1 -1
- package/dist/agents/agents/helpGraph/graph/helpGraph.js +1 -1
- package/dist/agents/agents/layerStyling/context/layerStylingContext.js +1 -1
- package/dist/agents/agents/layerStyling/graph/layerStylingGraph.js +1 -1
- package/dist/agents/agents/navigation/navigationAgent.js +1 -1
- package/dist/agents/agents/navigationGraph/graph/navigationGraph.js +1 -1
- package/dist/agents/tools/filter/clearFilters/adapter.js +1 -1
- package/dist/agents/tools/filter/resetMap/adapter.js +1 -1
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +1 -1
- package/dist/agents/tools/help/listFields/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToAddress/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToBookmark/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToFeatures/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToFullExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToLayer/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToScale/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToViewpoint/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToZoom/adapter.js +1 -1
- package/dist/agents/tools/query/getAttribute/adapter.js +29 -25
- package/dist/agents/tools/query/getStatistics/adapter.js +71 -67
- package/dist/agents/tools/query/getTopFeatures/adapter.js +75 -71
- package/dist/agents/tools/query/queryFeatures/adapter.js +41 -37
- 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/{3HV6OXCZ.js → 2JD3G7IW.js} +2 -2
- package/dist/cdn/2NOLMOEP.js +9 -0
- 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/{4OLV5LA7.js → 3COVQI26.js} +2 -2
- package/dist/cdn/{VIJVRJHL.js → 3UVQLYUK.js} +2 -2
- package/dist/cdn/{BIEX4MVV.js → 5HNKH5OK.js} +2 -2
- package/dist/cdn/{46DT6BIG.js → 5INBG23U.js} +1 -1
- package/dist/cdn/{MHUEU6MR.js → 5LBUP33F.js} +2 -2
- package/dist/cdn/{UZLQALHY.js → 5PV2GUZW.js} +1 -1
- package/dist/cdn/{UYEF3IKE.js → 5SRRG7WG.js} +2 -2
- package/dist/cdn/{AMFZY5QK.js → 5XZ5VL42.js} +2 -2
- package/dist/cdn/{IEAHAC6B.js → 63OF33IL.js} +2 -2
- package/dist/cdn/{7OQA4GCM.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/{VVWKEN53.js → 7APXFHDF.js} +3 -3
- package/dist/cdn/{QJOO6IIX.js → 7GDMXAF5.js} +2 -2
- package/dist/cdn/7JIXXYZR.js +2 -0
- package/dist/cdn/{2ZH5JNHL.js → 7OQK2F7O.js} +2 -2
- package/dist/cdn/{I7PHDOEQ.js → 7XVIZ7HK.js} +2 -2
- package/dist/cdn/{TRZJYWEB.js → A4ZVCRVF.js} +3 -3
- 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/AOT3PM2Q.js +2 -0
- package/dist/cdn/{YO3L3XIH.js → AQ7KG25Q.js} +2 -2
- package/dist/cdn/{KKXOSV62.js → AWH4VDPD.js} +2 -2
- package/dist/cdn/AY2ZONWQ.js +2 -0
- package/dist/cdn/{B2JRBDJZ.js → BMVPOFHU.js} +2 -2
- package/dist/cdn/BWUQRZPK.js +2 -0
- package/dist/cdn/{EXIA3APU.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/{W3OJTTVX.js → COANVCKH.js} +2 -2
- package/dist/cdn/D7CRICBG.js +2 -0
- package/dist/cdn/D7FEOAW3.js +2 -0
- package/dist/cdn/{37EJSNE3.js → DY6MO2CA.js} +2 -2
- package/dist/cdn/EKMCGN6R.js +2 -0
- package/dist/cdn/EUIURCPS.js +2 -0
- package/dist/cdn/{NN6MELJ7.js → FGQH46Z2.js} +2 -2
- package/dist/cdn/FIZMK7GS.js +1 -0
- package/dist/cdn/FONIQ7VF.js +2 -0
- package/dist/cdn/G3KILEGJ.js +2 -0
- package/dist/cdn/{FYZATVB3.js → G7MCIFV2.js} +2 -2
- package/dist/cdn/{SDWWUWAF.js → GGAXXX5X.js} +2 -2
- package/dist/cdn/GS5JDPZH.js +2 -0
- package/dist/cdn/{KJZVYKWL.js → H4QWVTEZ.js} +2 -2
- package/dist/cdn/{HWNPZ4CF.js → H6J65TWL.js} +2 -2
- package/dist/cdn/{UHEYPSOR.js → HCPI2RJE.js} +2 -2
- package/dist/cdn/{TPMZRJEC.js → HJOWCZPL.js} +2 -2
- package/dist/cdn/HOMSK66Q.js +2 -0
- package/dist/cdn/{SBIYXWXZ.js → HTNKDDEV.js} +2 -2
- package/dist/cdn/{OFM2S6U7.js → HU527DML.js} +2 -2
- package/dist/cdn/I37ZJHTM.js +2 -0
- package/dist/cdn/{7DRHB24Z.js → I724KIFI.js} +2 -2
- package/dist/cdn/IH5P2PWJ.js +2 -0
- package/dist/cdn/{ZBRZU4XB.js → J3T5HB77.js} +2 -2
- package/dist/cdn/{ZMMUAYDN.js → JCWFLYB4.js} +2 -2
- package/dist/cdn/{IHP25JWI.js → JSRNLNOE.js} +2 -2
- package/dist/cdn/{MPWEXYYB.js → KDA5VPLO.js} +2 -2
- package/dist/cdn/KRPPMEOF.js +2 -0
- package/dist/cdn/{W6TS2TIE.js → KURNYULZ.js} +2 -2
- package/dist/cdn/{YOQCQAKT.js → L46O52F7.js} +2 -2
- package/dist/cdn/{W3ZLMBEE.js → L5OYOLWV.js} +3 -3
- package/dist/cdn/{M7TMD2HP.js → LDDP7NSY.js} +2 -2
- package/dist/cdn/{ZQTCPJUV.js → LGIXZLOP.js} +2 -2
- package/dist/cdn/{ENVTUTY6.js → LMAIOLS2.js} +2 -2
- package/dist/cdn/{CFAC4FN3.js → LWEKPFV6.js} +2 -2
- package/dist/cdn/M52LKZN7.js +2 -0
- package/dist/cdn/{6GQCLDLJ.js → M5UMOOL2.js} +2 -2
- package/dist/cdn/MHXM37QI.js +2 -0
- package/dist/cdn/{XI4BPYGB.js → MR3R5YHQ.js} +2 -2
- package/dist/cdn/{H7WJUUJT.js → MUSLUFKI.js} +2 -2
- package/dist/cdn/MYLY2ABI.js +2 -0
- package/dist/cdn/{2XXM52PS.js → N2GN5WOI.js} +3 -3
- package/dist/cdn/{2FUTKTNO.js → NAVK5JJ2.js} +3 -3
- package/dist/cdn/NDSYDURO.js +2 -0
- package/dist/cdn/{EU6YSCZL.js → NK2QRPS6.js} +2 -2
- package/dist/cdn/{GMZUN5SF.js → NYFL2F5L.js} +2 -2
- package/dist/cdn/{O62IJLTZ.js → OKDXM5D4.js} +2 -2
- package/dist/cdn/{I5OBL24F.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/OZDRETY2.js +5 -0
- package/dist/cdn/{DYSPEU7W.js → PR4VMSKD.js} +1 -1
- package/dist/cdn/{V7ERVXIO.js → PXBS2FXE.js} +2 -2
- package/dist/cdn/{B4C7NIB5.js → Q7BJGEFH.js} +3 -3
- package/dist/cdn/QAVDW7A7.js +2 -0
- package/dist/cdn/{ONQ6JSBJ.js → QBZP6XOE.js} +1 -1
- package/dist/cdn/{OT5ECP4V.js → RFIN7KO6.js} +2 -2
- package/dist/cdn/RNJ7T5GF.js +2 -0
- package/dist/cdn/{Q6PCXSZT.js → S6OUM5X2.js} +2 -2
- package/dist/cdn/SG6PAUVR.js +2 -0
- package/dist/cdn/{U53SVXZK.js → SRXUC4QB.js} +2 -2
- package/dist/cdn/SUMXIUIS.js +2 -0
- 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/{T2FKFOHE.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/{DWMZ23QK.js → UJMM5QA4.js} +2 -2
- package/dist/cdn/UMTRLI63.js +2 -0
- package/dist/cdn/{MQSOVP27.js → UP7RW5K2.js} +2 -2
- package/dist/cdn/{J37GSI7C.js → UR2S7L6Z.js} +2 -2
- package/dist/cdn/{CEKOEHB3.js → UWHRBGWN.js} +2 -2
- package/dist/cdn/UXDRYDOD.js +11 -0
- package/dist/cdn/UZ7XFHYI.js +2 -0
- package/dist/cdn/V66TS2BB.js +2 -0
- package/dist/cdn/{AAUVOBPS.js → VINKTQFR.js} +1 -1
- package/dist/cdn/{U3ZTF2BC.js → VU7IOGNS.js} +2 -2
- package/dist/cdn/W2SIOY2B.js +3 -0
- package/dist/cdn/{WVMQ3I6F.js → W36IUEUB.js} +2 -2
- package/dist/cdn/{V6AQFRUC.js → WEBAQIUT.js} +2 -2
- package/dist/cdn/{WSIZ2OTL.js → WHIWOYHN.js} +1 -1
- package/dist/cdn/WOL5YMJ2.js +2 -0
- package/dist/cdn/{RBRHDEOB.js → X3YFCWQZ.js} +2 -2
- package/dist/cdn/{ICBIUFK7.js → X4EQEKM7.js} +2 -2
- package/dist/cdn/{UPSFL6U3.js → XBWGOD6I.js} +2 -2
- package/dist/cdn/XGDXTTYW.js +2 -0
- package/dist/cdn/{FFWPUYGD.js → XLHYQNAM.js} +2 -2
- package/dist/cdn/{NEV6OZN3.js → XMQJWPXI.js} +2 -2
- package/dist/cdn/{FXRZCD5Y.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/{645SDZBB.js → Y3ZKMD47.js} +2 -2
- package/dist/cdn/{2GSHUAQ2.js → YAANCUW2.js} +2 -2
- package/dist/cdn/{XJUYG2M3.js → YD5LVM7V.js} +2 -2
- package/dist/cdn/{TTPTZBCM.js → YGI277SH.js} +2 -2
- package/dist/cdn/YGSDJ4V3.js +14 -0
- package/dist/cdn/YJEARDAZ.js +2 -0
- package/dist/cdn/{DXCDVRGL.js → YSEHJQ4L.js} +2 -2
- package/dist/cdn/Z44NI2YQ.js +2 -0
- package/dist/cdn/{74CVYM72.js → ZEDDYT24.js} +2 -2
- package/dist/cdn/{ZBBI5M2X.js → ZROI63CW.js} +2 -2
- package/dist/cdn/{ZKDCEL6K.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 +15 -0
- package/dist/cdn/agent-utils/tools/WebMCPToolProvider.js +2 -0
- package/dist/cdn/agent-utils/workflows/ConditionalWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/LoopWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/ParallelWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/RouterWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/SequentialWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/SwitchWorkflow.js +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/orchestrator/embeddings/getEmbeddings.js +2 -2
- package/dist/cdn/orchestrator/models/chatModel.js +2 -2
- package/dist/cdn/orchestrator/models/prompts.js +2 -2
- package/dist/cdn/orchestrator/signals.js +2 -2
- package/dist/cdn/orchestrator/state/runtime.js +2 -2
- package/dist/chunks/BaseWorkflow.js +1 -1
- package/dist/chunks/SKILL.js +1 -1
- package/dist/chunks/SKILL2.js +1 -1
- package/dist/chunks/SKILL3.js +1 -1
- package/dist/chunks/SKILL4.js +1 -1
- package/dist/chunks/adapter.js +1 -1
- package/dist/chunks/adapter2.js +1 -1
- package/dist/chunks/aiFactory.js +1 -1
- package/dist/chunks/aiUtilityService.js +1 -1
- package/dist/chunks/arcgisToolRegistry.js +1 -1
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_current_map_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
- package/dist/chunks/converterUtils.js +66 -110
- package/dist/chunks/createSkillAgent.js +1 -1
- package/dist/chunks/data_explore_filter_prompt.js +1 -1
- package/dist/chunks/data_explore_query_prompt.js +1 -1
- package/dist/chunks/embeddings.worker.js +1 -1
- package/dist/chunks/fetchAgentContext.js +1 -1
- package/dist/chunks/fetchService.js +1 -1
- package/dist/chunks/fetchUtils.js +1 -1
- package/dist/chunks/fieldStatistics.js +1 -1
- package/dist/chunks/field_descriptions_prompt.js +1 -1
- package/dist/chunks/formatFeatureAttributes.js +1 -1
- package/dist/chunks/getPrompt.js +1 -1
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpState.js +1 -1
- package/dist/chunks/help_prompt.js +1 -1
- package/dist/chunks/intent_prompt.js +1 -1
- package/dist/chunks/layerQueryToolCalling.js +1 -1
- package/dist/chunks/layerStylingState.js +1 -1
- package/dist/chunks/layer_descriptions_prompt.js +1 -1
- package/dist/chunks/layer_styling_prompt.js +1 -1
- package/dist/chunks/localization.js +1 -1
- package/dist/chunks/mergeWhereClauses.js +1 -1
- package/dist/chunks/modelConfig.js +1 -1
- package/dist/chunks/modelPricing.js +1 -1
- package/dist/chunks/navigationState.js +1 -1
- package/dist/chunks/navigation_intent_prompt.js +1 -1
- package/dist/chunks/navigation_tool_prompt.js +1 -1
- package/dist/chunks/observationSnapshot.js +1 -1
- package/dist/chunks/reducers.js +1 -1
- package/dist/chunks/requireAgentServices.js +1 -1
- package/dist/chunks/resolveFieldNames.js +9 -0
- package/dist/chunks/resolveGeometryFilter.js +1 -1
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/runtime2.js +1 -1
- package/dist/chunks/runtimeSpans.js +1 -1
- package/dist/chunks/schema.js +1 -1
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +1 -1
- package/dist/chunks/summarize_query_response_prompt.js +1 -1
- package/dist/chunks/textFormatters.js +1 -1
- package/dist/chunks/toolCallResponse.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/webmapSchema.js +1 -1
- package/dist/components/arcgis-assistant/customElement.js +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.js +1 -1
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-log/customElement.js +5 -6
- package/dist/components/arcgis-assistant-message-log/index.js +5 -0
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-text/customElement.js +11 -12
- package/dist/components/arcgis-assistant-message-text/index.js +5 -0
- 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 +8 -9
- package/dist/components/arcgis-assistant-user-message/index.js +5 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/orchestrator/embeddings/cosineSimilarity.js +1 -1
- package/dist/orchestrator/embeddings/getEmbeddings.js +1 -1
- package/dist/orchestrator/embeddings/webmapEmbeddings.js +1 -1
- package/dist/orchestrator/models/chatModel.js +1 -1
- package/dist/orchestrator/models/prompts.js +1 -1
- package/dist/orchestrator/orchestrator/orchestrator.js +1 -1
- package/dist/orchestrator/orchestrator/orchestratorEvents.js +1 -1
- package/dist/orchestrator/signals.js +1 -1
- package/dist/orchestrator/state/runtime.js +1 -1
- package/dist/orchestrator/state/types.js +1 -1
- package/dist/orchestrator/types.js +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +8 -5
- package/dist/cdn/25CQLMB4.js +0 -2
- package/dist/cdn/34HKOU3T.js +0 -2
- package/dist/cdn/3WS4DSWD.js +0 -2
- package/dist/cdn/434TAA3J.js +0 -2
- package/dist/cdn/43OJZMBB.js +0 -2
- package/dist/cdn/4BRIOLDJ.js +0 -2
- package/dist/cdn/4KFTUBFL.js +0 -2
- package/dist/cdn/4ZPGFIE2.js +0 -2
- package/dist/cdn/6JCDY4FL.js +0 -2
- package/dist/cdn/7GQCNR4P.js +0 -11
- package/dist/cdn/A3KIOUWB.js +0 -2
- package/dist/cdn/BKKLQUK2.js +0 -2
- package/dist/cdn/CADNOKIK.js +0 -2
- package/dist/cdn/DQRKGYR3.js +0 -2
- package/dist/cdn/EOSKJPQV.js +0 -2
- package/dist/cdn/F7VQ3WH2.js +0 -2
- package/dist/cdn/FBIPIDP7.js +0 -2
- package/dist/cdn/GOET2CH4.js +0 -2
- package/dist/cdn/ISDNOFHU.js +0 -3
- package/dist/cdn/JZS6ZSWH.js +0 -2
- package/dist/cdn/KEBMHD4R.js +0 -9
- package/dist/cdn/KPHHXMRK.js +0 -2
- package/dist/cdn/LVSIZRTB.js +0 -2
- package/dist/cdn/OJP56R5R.js +0 -2
- package/dist/cdn/OYHYHALE.js +0 -2
- package/dist/cdn/QQPVN5MG.js +0 -2
- package/dist/cdn/QUZTFUWM.js +0 -1
- package/dist/cdn/REE4K4J7.js +0 -2
- package/dist/cdn/RFKOCMMT.js +0 -2
- package/dist/cdn/RKHDRUX5.js +0 -2
- package/dist/cdn/TGI7QCB2.js +0 -2
- package/dist/cdn/UALF45Q2.js +0 -2
- package/dist/cdn/WB5AFS42.js +0 -2
- package/dist/cdn/WC6SHIEX.js +0 -2
- package/dist/cdn/XPSPAZUD.js +0 -2
- package/dist/cdn/YAUQJ6NV.js +0 -2
- package/dist/cdn/YD3DLETZ.js +0 -2
- package/dist/cdn/YKKIJTJY.js +0 -2
- package/dist/cdn/ZCNCYKXW.js +0 -14
- package/dist/cdn/ZESTW6HJ.js +0 -2
- package/dist/cdn/ZS5P7NRI.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{f as z,g as I}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{f as z,g as I}from"./T2OYUOSO.js";import{A as R,C as S,g as $,h as r,j as x,s as M,t as k,u as A,x as L,z as b}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var D=M(class extends k{constructor(){super(...arguments),this.key=x}render(c,e){return this.key=c,e}update(c,[e,t]){return e!==this.key&&(A(c),this.key=e),t}});var j=$`:host{display:block;min-width:0}.details{padding:var(--calcite-spacing-md)}.details>*+*{margin-block-start:var(--calcite-spacing-lg)}h3{margin:0 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-relative-base);font-weight:var(--calcite-font-weight-semibold)}.metadata calcite-table-header,.detail-value{overflow-wrap:anywhere}calcite-table{font-variant-numeric:tabular-nums}.waterfall{font-size:var(--calcite-font-size-relative-xs);font-variant-numeric:tabular-nums}.waterfall-row{padding-block:var(--calcite-spacing-xxs)}.ticks{display:flex;align-items:center;justify-content:space-between;gap:var(--calcite-spacing-xs)}.waterfall-steps{margin:0;padding:0;list-style:none}.track{position:relative;height:24px;overflow:hidden}.bar{position:absolute;inset-block:0;min-width:2px;background-color:var(--calcite-color-brand);opacity:.3}.bar-label,.unrecorded{display:block;padding-inline:var(--calcite-spacing-xxs);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:24px}.bar-label{position:absolute;inset-block:0;left:min(var(--step-offset),max(0px,calc(100% - 16rem)));right:0}.empty{display:grid;min-height:5rem;place-items:center;color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm)}`;function C(c,e){let t=new Map;for(let i of e)if(i.parentId){let d=t.get(i.parentId)??[];d.push(i),t.set(i.parentId,d)}let s=new Set([c.id]),l=[c.id],o=[];for(;l.length;)for(let i of t.get(l.pop())??[])s.has(i.id)||(s.add(i.id),l.push(i.id),I(i)&&o.push(i));return o.sort((i,d)=>i.startedAt-d.startedAt)}var f=class extends L{static{this.properties={run:0,span:0}}static{this.styles=j}render(){let e=this.span,t=e?void 0:this.run,s=e??t;if(!s)return null;let l=a=>a===void 0?"Unavailable":z({...s,durationMs:a}),o=this.run?.spans??[],i=!e||e.timingRecorded,d=e?C(e,o):[],v=i?t?t.latency.steps:d.map(a=>({spanId:a.id,offsetMs:Math.max(0,a.startedAt-s.startedAt),durationMs:a.timingRecorded?a.durationMs:void 0,timingRecorded:a.timingRecorded})):[],m=i?t?t.latency.timelineMs:e?.durationMs??Math.max(0,...o.map(a=>(a.endedAt??a.startedAt)-s.startedAt)):0,u=Math.max(1,m),N=t?[{label:"Run elapsed",value:l(t.latency.elapsedMs)},{label:"Recorded interrupt wait",value:l(t.latency.interruptWaitMs)},{label:"Elapsed excluding interrupts",value:l(t.latency.elapsedExcludingInterruptsMs)}]:[{label:"Status",value:s.status},{label:"Started",value:e?.timingRecorded?new Date(s.startedAt).toLocaleString():"Not recorded"},{label:"Ended",value:s.endedAt!==void 0?new Date(s.endedAt).toLocaleString():"Not recorded"},{label:"Duration",value:e?.timingRecorded?l(s.durationMs):"Not recorded"}];return r`<div class="details"><section aria-label="Latency details"><h3>Latency</h3><calcite-table class="metadata" caption="Latency metadata" aria-label="Latency metadata" scale=s layout=fixed interaction-mode=static bordered><calcite-table-row slot=table-header><calcite-table-header heading=Field></calcite-table-header><calcite-table-header heading=Value col-span=2></calcite-table-header></calcite-table-row>${N.map(a=>r`<calcite-table-row><calcite-table-header .heading=${a.label}></calcite-table-header><calcite-table-cell col-span=2><span class="detail-value">${a.value}</span></calcite-table-cell></calcite-table-row>`)}</calcite-table></section>${t||d.length?r`<section class="waterfall" aria-label="Latency waterfall"><h3>Step timing</h3>${i?r`<div class="waterfall-row" aria-hidden=true><div class="ticks"><span>0 ms</span><span>${l(m/2)}</span><span>${l(m)}</span></div></div>${v.length?r`<ol class="waterfall-steps">${v.map(a=>{let n=o.find(V=>V.id===a.spanId),h=a.timingRecorded,p=a.offsetMs,g=a.durationMs??Math.max(0,m-p),y=h?l(g):"Not recorded",w=`${n.label} (${y}${n.status==="completed"?"":`, ${n.status}`})`,E=`${n.label} | ${n.type}${n.metadata?.model?` | ${n.metadata.model}`:""} | ${n.status} | ${y}${h?` | Start: ${l(p)}`:""}`;return D(n.id,r`<li class="waterfall-row" aria-label=${E??R}><div class="track" style=${b({"--step-offset":`${p/u*100}%`})}>${h?r`<span class="bar" aria-hidden=true style=${b({left:`${p/u*100}%`,width:`${Math.min(g,Math.max(0,u-p))/u*100}%`})}></span><span class="bar-label">${w}</span>`:r`<span class="unrecorded">${w}</span>`}</div></li>`)})}</ol>`:r`<div class="empty">No steps recorded.</div>`}`:r`<div class="empty">Timing not recorded.</div>`}</section>`:null}</div>`}};S("arcgis-assistant-observation-latency",f);export{f as ArcgisAssistantObservationLatency};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as d}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as d}from"./ZUKM4DGB.js";import"./FIZMK7GS.js";import"./SUMXIUIS.js";import"./PR4VMSKD.js";import{C as p,g as n,h as e,o as l,v as r,w as i,x as h,y as u}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var _=n`:host{padding:var(--calcite-spacing-md);background:var(--calcite-panel-background-color, var(--calcite-color-background))}calcite-panel{border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));border:0 solid var(--calcite-color-brand);border-block-start-width:4px;box-shadow:var(--calcite-shadow-md);width:100%;--calcite-panel-border-color: none}.interrupt-content{padding:0 var(--calcite-spacing-md);background:var(--calcite-color-foreground-1)}.other-input calcite-input[disabled]{pointer-events:none}.last-option{--calcite-list-border-color: transparent}`,o=class extends h{constructor(){super(...arguments),this.#e=r(),this.#t=r(),this._messages=d({blocking:!0}),this._selectedOptions=[],this._otherValue="",this._otherSelected=!1,this.arcgisCancel=l(),this.arcgisSubmit=l()}static{this.properties={_selectedOptions:16,_otherValue:16,_otherSelected:16,type:1,message:1,options:[1,{type:Array}]}}static{this.styles=_}#e;#t;_isSubmitDisabled(){return this._otherSelected?!this._otherValue.trim():!this._selectedOptions.length}_getSubmitValue(){return typeof this._selectedOptions=="string"?this._otherSelected?this._otherValue.trim():this._selectedOptions:this._selectedOptions.concat(this._otherSelected?this._otherValue.trim():[])}_getSkipValue(){return this.type==="multi-select"?[]:""}_selectOtherOption(){this._otherSelected||(this._otherSelected=!0,this.type!=="multi-select"&&(this._selectedOptions=""),this._focusOtherInput())}_handleSingleSelectChange(t){let s=this._otherSelected;this._otherSelected=t.target.selectedItems[0]===this.#t.value,this._selectedOptions=this._otherSelected?"":t.target.selectedItems[0]?.value,this._otherSelected&&!s&&this._focusOtherInput()}_handleMultiSelectChange(t){let s=this._otherSelected,a=this.#t.value;this._otherSelected=a?t.target.selectedItems.includes(a):!1,this._selectedOptions=t.target.selectedItems.filter(c=>c!==a).map(c=>c.value),this._otherSelected&&!s&&this._focusOtherInput()}async _focusOtherInput(){await this.updateComplete,await this.#e.value?.setFocus()}_renderOptions(){return this.options?.map((t,s)=>e`<calcite-list-item class=${u({"last-option":s===this.options.length-1})} .label=${t} .value=${t}></calcite-list-item>`)}_renderOtherInput(){return e`<div slot=content class="other-input" @click=${t=>{t.stopPropagation(),this._selectOtherOption()}}><calcite-input .label=${this._messages.otherLabel} .placeholder=${this._messages.otherLabel} .disabled=${!this._otherSelected} @calciteInputInput=${t=>this._otherValue=t.target.value} ${i(this.#e)}></calcite-input></div>`}_renderInterruptOptions(){switch(this.type){case"single-select":return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${t=>this._handleSingleSelectChange(t)}>${this._renderOptions()}<calcite-list-item .selected=${this._otherSelected} ${i(this.#t)}>${this._renderOtherInput()}</calcite-list-item></calcite-list>`;case"multi-select":return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${t=>this._handleMultiSelectChange(t)}>${this._renderOptions()}<calcite-list-item .selected=${this._otherSelected} ${i(this.#t)}>${this._renderOtherInput()}</calcite-list-item></calcite-list>`;case"boolean-choice":return null;case"text-input":return e`<calcite-input .label=${this._messages.enterTextLabel} @calciteInputInput=${t=>this._selectedOptions=t.target.value}></calcite-input>`}}render(){return e`<calcite-panel .description=${this.message}><div class="interrupt-content">${this._renderInterruptOptions()}</div>${this.type==="boolean-choice"?e`<calcite-button slot=footer-end appearance=outline @click=${()=>this.arcgisSubmit.emit(!1)}>${this._messages.declineButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid @click=${()=>this.arcgisSubmit.emit(!0)}>${this._messages.approveButtonLabel}</calcite-button>`:e`<calcite-button slot=footer-end appearance=outline @click=${()=>this.arcgisSubmit.emit(this._getSkipValue())}>${this._messages.skipButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid .disabled=${this._isSubmitDisabled()} @click=${()=>this.arcgisSubmit.emit(this._getSubmitValue())}>${this._messages.submitButtonLabel}</calcite-button>`}</calcite-panel>`}};p("arcgis-assistant-interrupt",o);export{o as ArcgisAssistantInterrupt};
|
|
@@ -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"./GS5JDPZH.js";export default $arcgis.t(([y,m,g,f])=>{var p=["feet","kilometers","meters","miles","nautical-miles","us-nautical-miles"],d=r.enum(p);var u=750;function h(e){return"point"in e&&e.point!==void 0}function b(e){return"layerId"in e&&e.layerId!==void 0}function w(e){return"polygon"in e&&e.polygon!==void 0}function R(e){return"polyline"in e&&e.polyline!==void 0}var F=async(e,i)=>{if(h(e)){let{point:t}=e;return{geometry:new y({x:t.x,y:t.y,spatialReference:t.spatialReference?{wkid:t.spatialReference.wkid}:i.spatialReference})}}if(w(e))return{geometry:new m({rings:e.polygon.rings,spatialReference:e.polygon.spatialReference})};if(R(e))return{geometry:new g({paths:e.polyline.paths,spatialReference:e.polyline.spatialReference})};if(b(e)){let t=i.map?.allLayers.find(n=>n.id===e.layerId);if(!t)return{error:`Could not find geometry layer with ID: ${e.layerId}`};let o=t.title??t.id,a=e.where?.trim()||"1=1";try{let n=await t.queryFeatures({where:a,returnGeometry:!0,outSpatialReference:i.spatialReference,num:u+1});if(!n.features.length)return{error:`No features found in geometry layer "${o}" with the specified where clause: ${a}`};if(n.features.length>u)return{error:`Geometry filter for layer "${o}" matched too many features (${n.features.length}+). Please narrow the geometry layer filter.`};let s=n.features.map(c=>c.geometry).filter(c=>!!c);if(!s.length)return{error:"No valid geometries found for the matched geometry layer features."};let l=s.length===1?s[0]:f.executeMany(s);return l?(l.spatialReference||(l.spatialReference=i.spatialReference),{geometry:l}):{error:"Failed to combine geometries from geometry layer."}}catch(n){return{error:`Failed to query geometry: ${String(n)}`}}}return{error:"Invalid geometry configuration provided"}},I=r.object({id:r.string()}),j=r.discriminatedUnion("kind",[r.object({id:r.string(),kind:r.literal("point"),payload:r.object({x:r.number(),y:r.number(),spatialReference:r.object({wkid:r.number()}).optional()})}),r.object({id:r.string(),kind:r.literal("polyline"),payload:r.object({paths:r.array(r.array(r.array(r.number()))),spatialReference:r.object({wkid:r.number()}).optional()})}),r.object({id:r.string(),kind:r.literal("polygon"),payload:r.object({rings:r.array(r.array(r.array(r.number()))),spatialReference:r.object({wkid:r.number()}).optional()})})]),U=r.object({sharedResourceId:r.string().describe("ID of a point, polyline, or polygon returned by listSharedResources."),distance:r.number().optional().describe("Optional buffer distance around the geometry."),units:d.optional().describe("The units for the distance buffer.")}),q=(e,i)=>{if(!e||!("sharedResourceId"in e))return e;if(!i)throw new Error("Shared resources are unavailable in the tool runtime state.");let t=i.find(a=>{let n=I.safeParse(a);return n.success&&n.data.id===e.sharedResourceId});if(!t)throw new Error(`Shared resource not found: ${e.sharedResourceId}`);let o=j.safeParse(t);if(!o.success)throw new Error(`Shared resource ${e.sharedResourceId} does not contain valid point, polyline, or polygon geometry.`);switch(o.data.kind){case"point":return{point:o.data.payload,distance:e.distance,units:e.units};case"polyline":return{polyline:o.data.payload,distance:e.distance,units:e.units};case"polygon":return{polygon:o.data.payload,distance:e.distance,units:e.units}}};return{a:d,b:h,c:b,d:F,e:U,f:q}},"geometry/Point","geometry/Polygon","geometry/Polyline","geometry/operators/unionOperator")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{$ as ie,A as $e,Aa as ta,B as Je,Ba as na,C as Mn,Ca as ft,D as In,E as ze,F as On,G as An,H as xn,I as Nn,J as Pn,K as Ln,L as Rn,M as Fn,N as Dn,O as Bn,P as Un,Q as jn,R as Gn,S as Vn,T as $n,U as Jn,V as zn,X as xe,Y as Kn,ca as Wn,d as yn,da as V,ea as Ke,fa as Hn,g as K,ga as Yn,ha as We,i as bn,ia as He,j as pe,ja as $,ka as Zn,la as Xn,m as de,ma as he,n as Ve,na as Ye,o as mt,oa as qn,pa as Qn,q as Tn,s as ge,t as vn,u as wn,v as Cn,w as Z,x as Sn,y as kn,ya as Ze,z as En,za as ea}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{$ as ie,A as $e,Aa as ta,B as Je,Ba as na,C as Mn,Ca as ft,D as In,E as ze,F as On,G as An,H as xn,I as Nn,J as Pn,K as Ln,L as Rn,M as Fn,N as Dn,O as Bn,P as Un,Q as jn,R as Gn,S as Vn,T as $n,U as Jn,V as zn,X as xe,Y as Kn,ca as Wn,d as yn,da as V,ea as Ke,fa as Hn,g as K,ga as Yn,ha as We,i as bn,ia as He,j as pe,ja as $,ka as Zn,la as Xn,m as de,ma as he,n as Ve,na as Ye,o as mt,oa as qn,pa as Qn,q as Tn,s as ge,t as vn,u as wn,v as Cn,w as Z,x as Sn,y as kn,ya as Ze,z as En,za as ea}from"./A4ZVCRVF.js";import{$a as hn,A as Nt,Aa as cn,B as Pt,Ba as fe,C as Ue,Ca as un,D as Lt,Da as mn,E as Rt,Ea as fn,F as Ft,Fa as pn,G as Dt,Ga as re,H as Bt,Ha as dn,I as Ut,J as jt,Ja as je,K as Gt,Ka as gn,L as Vt,M as $t,N as Jt,O as zt,P as Kt,Q as Wt,R as U,S as ue,U as Ht,V as ve,W as we,Wa as Y,X as Yt,Y as Zt,Z as Xt,_a as Ge,a as S,ab as oe,ba as te,bb as z,ca as Ce,cb as _n,da as qt,ea as Qt,fa as j,ga as me,ha as Se,ia as G,ja as ke,ka as Ee,la as en,ma as tn,na as Me,oa as Ie,pa as nn,q as ce,qa as an,ra as ne,s as At,sa as Oe,ta as sn,ua as rn,v as ut,va as Ae,wa as ae,x as xt,xa as se,y as De,ya as on,z as Be,za as ln}from"./272R36XK.js";var Xe=(e,t)=>{let n=[...new Set(t?.map(o=>{if(typeof o=="string")return o;let i=new o({});if(!("getType"in i)||typeof i.getType!="function")throw new Error("Invalid type provided.");return i.getType()}))],s=e.getType();return n.some(o=>o===s)};function ia(e,t){return Array.isArray(e)?aa(e,t):$.from(n=>aa(n,e))}function aa(e,t={}){let{includeNames:n,excludeNames:s,includeTypes:o,excludeTypes:i,includeIds:u,excludeIds:m}=t,p=[];for(let g of e)if(!(s&&g.name&&s.includes(g.name))){{if(i&&Xe(g,i))continue;if(m&&g.id&&m.includes(g.id))continue}o||u||n?(n&&g.name&&n.some(h=>h===g.name)||o&&Xe(g,o)||u&&g.id&&u.some(h=>h===g.id))&&p.push(g):p.push(g)}return p}function la(e){return Array.isArray(e)?sa(e):$.from(sa)}function sa(e){if(!e.length)return[];let t=[];for(let n of e){let s=n,o=t.pop();if(!o)t.push(s);else if(s.getType()==="tool"||s.getType()!==o.getType())t.push(o,s);else{let i=re(o),u=re(s),m=i.concat(u);typeof i.content=="string"&&typeof u.content=="string"&&(m.content=`${i.content}
|
|
3
3
|
${u.content}`),t.push(za(m))}}return t}function ca(e,t){if(Array.isArray(e)){let n=e;if(!t)throw new Error("Options parameter is required when providing messages.");return ra(n,t)}else{let n=e;return $.from(s=>ra(s,n)).withConfig({runName:"trim_messages"})}}async function ra(e,t){let{maxTokens:n,tokenCounter:s,strategy:o="last",allowPartial:i=!1,endOn:u,startOn:m,includeSystem:p=!1,textSplitter:g}=t;if(m&&o==="first")throw new Error("`startOn` should only be specified if `strategy` is 'last'.");if(p&&o==="first")throw new Error("`includeSystem` should only be specified if `strategy` is 'last'.");let h;"getNumTokens"in s?h=async _=>(await Promise.all(_.map(y=>s.getNumTokens(y.content)))).reduce((y,f)=>y+f,0):h=async _=>s(_);let b=dt;if(g&&("splitText"in g?b=g.splitText.bind(g):b=async _=>g(_)),o==="first")return ua(e,{maxTokens:n,tokenCounter:h,textSplitter:b,partialStrategy:i?"first":void 0,endOn:u});if(o==="last")return Ja(e,{maxTokens:n,tokenCounter:h,textSplitter:b,allowPartial:i,includeSystem:p,startOn:m,endOn:u});throw new Error(`Unrecognized strategy: '${o}'. Must be one of 'first' or 'last'.`)}async function ua(e,t){let{maxTokens:n,tokenCounter:s,textSplitter:o,partialStrategy:i,endOn:u}=t,m=[...e],p=0;for(let g=0;g<m.length;g+=1)if(await s(g>0?m.slice(0,-g):m)<=n){p=m.length-g;break}if(p<m.length&&i){let g=!1;if(Array.isArray(m[p].content)){let h=m[p];if(typeof h.content=="string")throw new Error("Expected content to be an array.");let b=h.content.length,_=i==="last"?[...h.content].reverse():h.content;for(let y=1;y<=b;y+=1){let f=i==="first"?_.slice(0,y):_.slice(-y),T=Object.fromEntries(Object.entries(h).filter(([E])=>E!=="type"&&!E.startsWith("lc_"))),w=pt(h.getType(),{...T,content:f}),v=[...m.slice(0,p),w];if(await s(v)<=n)m=v,p+=1,g=!0;else break}g&&i==="last"&&(h.content=[..._].reverse())}if(!g){let h=m[p],b;if(Array.isArray(h.content)&&h.content.some(_=>typeof _=="string"||_.type==="text")?b=h.content.find(_=>_.type==="text"&&_.text)?.text:typeof h.content=="string"&&(b=h.content),b){let _=await o(b),y=_.length;i==="last"&&_.reverse();for(let f=0;f<y-1;f+=1)if(_.pop(),h.content=_.join(""),await s([...m.slice(0,p),h])<=n){i==="last"&&(h.content=[..._].reverse().join("")),m=[...m.slice(0,p),h],p+=1;break}}}}if(u){let g=Array.isArray(u)?u:[u];for(;p>0&&!Xe(m[p-1],g);)p-=1}return m.slice(0,p)}async function Ja(e,t){let{allowPartial:n=!1,includeSystem:s=!1,endOn:o,startOn:i,...u}=t,m=e.map(h=>{let b=Object.fromEntries(Object.entries(h).filter(([_])=>_!=="type"&&!_.startsWith("lc_")));return pt(h.getType(),b,ue(h))});if(o){let h=Array.isArray(o)?o:[o];for(;m.length>0&&!Xe(m[m.length-1],h);)m=m.slice(0,-1)}let p=s&&m[0]?.getType()==="system",g=p?m.slice(0,1).concat(m.slice(1).reverse()):m.reverse();return g=await ua(g,{...u,partialStrategy:n?"last":void 0,endOn:i}),p?[g[0],...g.slice(1).reverse()]:g.reverse()}var oa={human:{message:ne,messageChunk:Oe},ai:{message:j,messageChunk:G},system:{message:ae,messageChunk:se},developer:{message:ae,messageChunk:se},tool:{message:ve,messageChunk:we},function:{message:Me,messageChunk:Ie},generic:{message:ke,messageChunk:Ee},remove:{message:Ae,messageChunk:Ae}};function pt(e,t,n){let s,o;switch(e){case"human":n?s=new Oe(t):o=new ne(t);break;case"ai":if(n){let i={...t};"tool_calls"in i&&(i={...i,tool_call_chunks:i.tool_calls?.map(u=>({...u,type:"tool_call_chunk",index:void 0,args:JSON.stringify(u.args)}))}),s=new G(i)}else o=new j(t);break;case"system":n?s=new se(t):o=new ae(t);break;case"developer":n?s=new se({...t,additional_kwargs:{...t.additional_kwargs,__openai_role__:"developer"}}):o=new ae({...t,additional_kwargs:{...t.additional_kwargs,__openai_role__:"developer"}});break;case"tool":if("tool_call_id"in t)n?s=new we(t):o=new ve(t);else throw new Error("Can not convert ToolMessage to ToolMessageChunk if 'tool_call_id' field is not defined.");break;case"function":if(n)s=new Ie(t);else{if(!t.name)throw new Error("FunctionMessage must have a 'name' field");o=new Me(t)}break;case"generic":if("role"in t)n?s=new Ee(t):o=new ke(t);else throw new Error("Can not convert ChatMessage to ChatMessageChunk if 'role' field is not defined.");break;default:throw new Error(`Unrecognized message type ${e}`)}if(n&&s)return s;if(o)return o;throw new Error(`Unrecognized message type ${e}`)}function za(e){let t=e.getType(),n,s=Object.fromEntries(Object.entries(e).filter(([o])=>!["type","tool_call_chunks"].includes(o)&&!o.startsWith("lc_")));if(t in oa&&(n=pt(t,s)),!n)throw new Error(`Unrecognized message chunk class ${t}. Supported classes are ${Object.keys(oa)}`);return n}function dt(e){let t=e.split(`
|
|
4
4
|
`);return Promise.resolve([...t.slice(0,-1).map(n=>`${n}
|
|
5
5
|
`),t[t.length-1]])}var ma=["tool_call","tool_call_chunk","invalid_tool_call","server_tool_call","server_tool_call_chunk","server_tool_call_result"];var fa=["image","video","audio","text-plain","file"];var pa=["text","reasoning",...ma,...fa];var tr=S({AIMessage:()=>j,AIMessageChunk:()=>G,BaseMessage:()=>jt,BaseMessageChunk:()=>Kt,ChatMessage:()=>ke,ChatMessageChunk:()=>Ee,DEFAULT_MERGE_IGNORE_KEYS:()=>Vt,FunctionMessage:()=>Me,FunctionMessageChunk:()=>Ie,HumanMessage:()=>ne,HumanMessageChunk:()=>Oe,KNOWN_BLOCK_TYPES:()=>pa,RemoveMessage:()=>Ae,SystemMessage:()=>ae,SystemMessageChunk:()=>se,ToolMessage:()=>ve,ToolMessageChunk:()=>we,_isMessageFieldWithRole:()=>Wt,_mergeDicts:()=>$t,_mergeLists:()=>Jt,_mergeObj:()=>zt,_mergeStatus:()=>Ut,coerceMessageLikeToMessage:()=>fe,collapseToolCallChunks:()=>dn,convertToChunk:()=>re,convertToOpenAIImageBlock:()=>Ue,convertToProviderContentBlock:()=>Ft,defaultTextSplitter:()=>dt,defaultToolCallParser:()=>Yt,filterMessages:()=>ia,getBufferString:()=>un,iife:()=>cn,isAIMessage:()=>me,isAIMessageChunk:()=>Se,isBase64ContentBlock:()=>Be,isBaseMessage:()=>U,isBaseMessageChunk:()=>ue,isChatMessage:()=>en,isChatMessageChunk:()=>tn,isDataContentBlock:()=>xt,isDirectToolOutput:()=>Ht,isFunctionMessage:()=>nn,isFunctionMessageChunk:()=>an,isHumanMessage:()=>sn,isHumanMessageChunk:()=>rn,isIDContentBlock:()=>Pt,isMessage:()=>Dt,isOpenAIToolCallArray:()=>Gt,isPlainTextContentBlock:()=>Nt,isSystemMessage:()=>on,isSystemMessageChunk:()=>ln,isToolMessage:()=>Zt,isToolMessageChunk:()=>Xt,isURLContentBlock:()=>De,mapChatMessagesToStoredMessages:()=>pn,mapStoredMessageToChatMessage:()=>mn,mapStoredMessagesToChatMessages:()=>fn,mergeContent:()=>Bt,mergeMessageRuns:()=>la,mergeResponseMetadata:()=>qt,mergeUsageMetadata:()=>Qt,parseBase64DataUrl:()=>Rt,parseMimeType:()=>Lt,trimMessages:()=>ca});var rr=S({ChatModelStream:()=>Qe,ReasoningContentStream:()=>_a,TextContentStream:()=>ga,ToolCallsStream:()=>ha,UsageMetadataStream:()=>ya}),Ka=class{events=[];finished=!1;waiters=[];error=null;push(e){this.events.push(e);let t=this.waiters.splice(0);for(let n of t)n()}finish(){this.finished=!0;let e=this.waiters.splice(0);for(let t of e)t()}setError(e){this.error=e,this.finished=!0;let t=this.waiters.splice(0);for(let n of t)n()}async*iterate(){if(this.finished){if(this.error)throw this.error;yield*this.events;return}let e=0;for(;;){for(;e<this.events.length;)yield this.events[e],e++;if(this.finished){if(this.error)throw this.error;return}await new Promise(t=>{if(e<this.events.length||this.finished){t();return}this.waiters.push(t)})}}};function Wa(e,t){switch(t.type){case"text-delta":return e.type==="text"?{...e,text:(e.text??"")+t.text}:e;case"reasoning-delta":return e.type==="thinking"?{...e,thinking:(e.thinking??"")+t.reasoning}:e.type==="reasoning"?{...e,reasoning:(e.reasoning??"")+t.reasoning}:e;case"data-delta":return{...e,data:(e.data??"")+t.data};case"block-delta":return{...e,...t.fields};default:throw new Error(`Unknown delta type: ${JSON.stringify(t)}`)}}function Ne(e){if(e.event!=="content-block-delta")return;if("delta"in e&&e.delta)return e.delta;let t=e.content;if(t==null||typeof t!="object")return;let n=t;if(n.type==="text"&&typeof n.text=="string")return{type:"text-delta",text:n.text};if(n.type==="reasoning"&&typeof n.reasoning=="string")return{type:"reasoning-delta",reasoning:n.reasoning};if(n.type==="thinking"&&typeof n.thinking=="string")return{type:"reasoning-delta",reasoning:n.thinking};if(typeof n.data=="string")return{type:"data-delta",data:n.data,encoding:"base64"};if(typeof n.type=="string")return{type:"block-delta",fields:{...n,type:n.type}}}function da(e){if(e==null||typeof e!="object")return;let t=e;if(t.type==="reasoning"&&typeof t.reasoning=="string")return t.reasoning;if(t.type==="thinking"&&typeof t.thinking=="string")return t.thinking}function qe(e){if(e==null||typeof e!="object")return!1;let t=e.type;return t==="reasoning"||t==="thinking"}function _e(e){if(e)return{...e,input_tokens:e.input_tokens??0,output_tokens:e.output_tokens??0,total_tokens:e.total_tokens??0}}function Ha(e){if(e!=null&&typeof e=="object"&&!Array.isArray(e))return e;if(typeof e!="string"||e.length===0)return{};try{let t=JSON.parse(e);return t!=null&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}function Ya(e){let t=e;if(e.type==="tool_call"||e.type!=="tool_call_chunk"&&e.type!=="tool_use"&&e.type!=="input_json_delta")return e;let n=typeof t.name=="string"?t.name:void 0;if(n==null)return e;let s=t.args??t.input;return{...t,type:"tool_call",name:n,args:Ha(s)}}var ga=class{_buffer;constructor(e){this._buffer=e}get full(){let e=this._buffer;return{async*[Symbol.asyncIterator](){let t="";for await(let n of e.iterate()){let s=Ne(n);s?.type==="text-delta"&&(t+=s.text,yield t)}}}}[Symbol.asyncIterator](){let e=this._buffer;async function*t(){for await(let n of e.iterate()){let s=Ne(n);s?.type==="text-delta"&&(yield s.text)}}return t()}then(e,t){return(async()=>{let n="";for await(let s of this)n+=s;return n})().then(e,t)}},ha=class{_buffer;constructor(e){this._buffer=e}get full(){let e=this._buffer;return{async*[Symbol.asyncIterator](){let t=[];for await(let n of e.iterate())n.event==="content-block-finish"&&n.content.type==="tool_call"&&(t.push(n.content),yield[...t])}}}[Symbol.asyncIterator](){let e=this._buffer;async function*t(){for await(let n of e.iterate())n.event==="content-block-finish"&&n.content.type==="tool_call"&&(yield n.content)}return t()}then(e,t){return(async()=>{let n=[];for await(let s of this)n.push(s);return n})().then(e,t)}},_a=class{_buffer;constructor(e){this._buffer=e}get full(){let e=this._buffer;return{async*[Symbol.asyncIterator](){let t="",n=!1;for await(let s of e.iterate())if(s.event==="content-block-start"){if(!qe(s.content)){if(n)return;continue}n=!0;let o=da(s.content);if(o==null||o.length===0)continue;t+=o,yield t}else if(s.event==="content-block-delta"){let o=Ne(s);if(o?.type!=="reasoning-delta")continue;n=!0;let i=o.reasoning;if(i==null||i.length===0)continue;t+=i,yield t}else{if(s.event==="content-block-finish"&&qe(s.content))return;if(s.event==="message-finish")return}}}}[Symbol.asyncIterator](){let e=this._buffer;async function*t(){let n=!1;for await(let s of e.iterate())if(s.event==="content-block-start"){if(!qe(s.content)){if(n)return;continue}n=!0;let o=da(s.content);o!=null&&o.length>0&&(yield o)}else if(s.event==="content-block-delta"){let o=Ne(s);if(o?.type!=="reasoning-delta")continue;n=!0;let i=o.reasoning;i!=null&&i.length>0&&(yield i)}else{if(s.event==="content-block-finish"&&qe(s.content))return;if(s.event==="message-finish")return}}return t()}then(e,t){return(async()=>{let n="";for await(let s of this)n+=s;return n})().then(e,t)}},ya=class{_buffer;constructor(e){this._buffer=e}[Symbol.asyncIterator](){let e=this._buffer;async function*t(){for await(let n of e.iterate())if(n.event==="usage"){let s=_e(n.usage);s&&(yield s)}else if(n.event==="message-start"&&n.usage){let s=_e(n.usage);s&&(yield s)}else if(n.event==="message-finish"&&n.usage){let s=_e(n.usage);s&&(yield s)}}return t()}then(e,t){return(async()=>{let n;for await(let s of this)n=s;return n})().then(e,t)}},Qe=class{_buffer;constructor(e){this._buffer=new Ka,this._consume(e)}async _consume(e){try{for await(let t of e)this._buffer.push(t);this._buffer.finish()}catch(t){this._buffer.setError(t instanceof Error?t:new Error(String(t)))}}[Symbol.asyncIterator](){return this._buffer.iterate()}get text(){return new ga(this._buffer)}get toolCalls(){return new ha(this._buffer)}get reasoning(){return new _a(this._buffer)}get usage(){return new ya(this._buffer)}get output(){return this._assembleMessage()}then(e,t){return this._assembleMessage().then(e,t)}async _assembleMessage(){let e=[],t,n,s={},o;for await(let u of this._buffer.iterate())switch(u.event){case"message-start":t=u.id??t,u.usage&&(n=_e(u.usage));break;case"content-block-start":e[u.index]=u.content;break;case"content-block-delta":{let m=e[u.index],p=Ne(u);m&&p&&(e[u.index]=Wa(m,p));break}case"content-block-finish":e[u.index]=u.content;break;case"usage":n=_e(u.usage);break;case"message-finish":o=u.reason,u.usage&&(n=_e(u.usage)),u.responseMetadata&&(s={...s,...u.responseMetadata});break;default:break}let i=e.filter(u=>u!=null).map(Ya);return new j({id:t,content:i,usage_metadata:n,response_metadata:{...s,...o?{finish_reason:o}:{},output_version:"v1"}})}};var gr=S({Embeddings:()=>Za}),Za=class{caller;constructor(e){this.caller=new Tn(e??{})}};var le=class extends V{static lc_name(){return"RunnablePassthrough"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;func;constructor(e){super(e),e&&(this.func=e.func)}async invoke(e,t){let n=oe(t);return this.func&&await this.func(e,n),this._callWithConfig(s=>Promise.resolve(s),e,n)}async*transform(e,t){let n=oe(t),s,o=!0;for await(let i of this._transformStreamWithConfig(e,u=>u,n))if(yield i,o)if(s===void 0)s=i;else try{s=K(s,i)}catch{s=void 0,o=!1}this.func&&s!==void 0&&await this.func(s,n)}static assign(e){return new Ye(new He({steps:e}))}};var ba=class extends V{static lc_name(){return"RouterRunnable"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;runnables;constructor(e){super(e),this.runnables=e.runnables}async invoke(e,t){let{key:n,input:s}=e,o=this.runnables[n];if(o===void 0)throw new Error(`No runnable associated with key "${n}".`);return o.invoke(s,oe(t))}async batch(e,t,n){let s=e.map(h=>h.key),o=e.map(h=>h.input);if(s.find(h=>this.runnables[h]===void 0)!==void 0)throw new Error("One or more keys do not have a corresponding runnable.");let i=s.map(h=>this.runnables[h]),u=this._getOptionsList(t??{},e.length),m=u[0]?.maxConcurrency??n?.maxConcurrency,p=m&&m>0?m:e.length,g=[];for(let h=0;h<o.length;h+=p){let b=o.slice(h,h+p).map((y,f)=>i[f].invoke(y,u[f])),_=await Promise.all(b);g.push(_)}return g.flat()}async stream(e,t){let{key:n,input:s}=e,o=this.runnables[n];if(o===void 0)throw new Error(`No runnable associated with key "${n}".`);return o.stream(s,t)}};var Ta=class extends V{static lc_name(){return"RunnableBranch"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;default;branches;constructor(e){super(e),this.branches=e.branches,this.default=e.default}static from(e){if(e.length<1)throw new Error("RunnableBranch requires at least one branch");let t=e.slice(0,-1).map(([s,o])=>[he(s),he(o)]),n=he(e[e.length-1]);return new this({branches:t,default:n})}async _invoke(e,t,n){let s;for(let o=0;o<this.branches.length;o+=1){let[i,u]=this.branches[o];if(await i.invoke(e,z(t,{callbacks:n?.getChild(`condition:${o+1}`)}))){s=await u.invoke(e,z(t,{callbacks:n?.getChild(`branch:${o+1}`)}));break}}return s||(s=await this.default.invoke(e,z(t,{callbacks:n?.getChild("branch:default")}))),s}async invoke(e,t={}){return this._callWithConfig(this._invoke,e,t)}async*_streamIterator(e,t){let n=await(await Ge(t))?.handleChainStart(this.toJSON(),Wn(e,"input"),t?.runId,void 0,void 0,void 0,t?.runName),s,o=!0,i;try{for(let u=0;u<this.branches.length;u+=1){let[m,p]=this.branches[u];if(await m.invoke(e,z(t,{callbacks:n?.getChild(`condition:${u+1}`)}))){i=await p.stream(e,z(t,{callbacks:n?.getChild(`branch:${u+1}`)}));for await(let g of i)if(yield g,o)if(s===void 0)s=g;else try{s=K(s,g)}catch{s=void 0,o=!1}break}}if(i===void 0){i=await this.default.stream(e,z(t,{callbacks:n?.getChild("branch:default")}));for await(let u of i)if(yield u,o)if(s===void 0)s=u;else try{s=K(s,u)}catch{s=void 0,o=!1}}}catch(u){throw await n?.handleChainError(u),u}await n?.handleChainEnd(s??{})}};var va=class extends Ke{runnable;inputMessagesKey;outputMessagesKey;historyMessagesKey;getMessageHistory;constructor(e){let t=$.from((i,u)=>this._enterHistory(i,u??{})).withConfig({runName:"loadHistory"}),n=e.historyMessagesKey??e.inputMessagesKey;n&&(t=le.assign({[n]:t}).withConfig({runName:"insertHistory"}));let s=t.pipe(e.runnable.withListeners({onEnd:(i,u)=>this._exitHistory(i,u??{})})).withConfig({runName:"RunnableWithMessageHistory"}),o=e.config??{};super({...e,config:o,bound:s}),this.runnable=e.runnable,this.getMessageHistory=e.getMessageHistory,this.inputMessagesKey=e.inputMessagesKey,this.outputMessagesKey=e.outputMessagesKey,this.historyMessagesKey=e.historyMessagesKey}_getInputMessages(e){let t;if(typeof e=="object"&&!Array.isArray(e)&&!U(e)){let n;this.inputMessagesKey?n=this.inputMessagesKey:Object.keys(e).length===1?n=Object.keys(e)[0]:n="input",Array.isArray(e[n])&&Array.isArray(e[n][0])?t=e[n][0]:t=e[n]}else t=e;if(typeof t=="string")return[new ne(t)];if(Array.isArray(t))return t;if(U(t))return[t];throw new Error(`Expected a string, BaseMessage, or array of BaseMessages.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.js";var e=`# ArcGIS Online Map Viewer \u2014 Layer Filter Tool Calling Assistant
|
|
3
3
|
|
|
4
4
|
You are an assistant that helps manage layer filters and visual effects for **ArcGIS Online Map Viewer** by selecting and calling the appropriate tool.
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
var s=(n,r)=>{let i=n?.configurable?.services?.[r];if(i==null)throw new Error(`${r} missing in config.configurable.services`);return i};export{s as a};
|
|
@@ -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{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{
|
|
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,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import o from"./L5OYOLWV.js";import{a as e,c as s}from"./NYFL2F5L.js";import"./YD5LVM7V.js";import l from"./AOT3PM2Q.js";import k from"./YGSDJ4V3.js";import j from"./M52LKZN7.js";import i from"./UXDRYDOD.js";import h from"./2H32MDP2.js";import"./OPQCY33W.js";import"./QAVDW7A7.js";import g from"./YSEHJQ4L.js";import"./7XVIZ7HK.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{a as m}from"./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 r}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import{a as n}from"./Q7BJGEFH.js";import"./V66TS2BB.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 d=({config:o})=>{let{mapView:t}=m(o,["mapView"]),l=t.map,g=Number.isFinite(t.zoom)?t.zoom:void 0;return JSON.stringify({availableBookmarks:l.bookmarks?.map(({name:c})=>c).filter(Boolean)??[],currentZoom:g},null,2)},u=[async()=>(await import("./LWEKPFV6.js")).default],p=n({id:"navigation",name:"Navigation Agent",description:"Navigates the map for explicit zoom, center, address, bookmark, layer, feature, extent, scale, and viewpoint requests. Use for questions asking where a place is or to resolve an address or place as a reusable spatial anchor for a proximity request. Resolves only the location; it does not query, display, filter, or highlight feature data.",skillLoaders:u,modelTier:"default",systemPrompt:"You are an ArcGIS map navigation agent.",runtimeContextLoader:d});var i=class extends r{constructor(){super(...arguments),this.agent=p}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-navigation-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=e(this,"arcgis-assistant-navigation-agent"),this.#i=s(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};a("arcgis-assistant-navigation-agent",i);return i},"intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/knowledgeGraphService",b,c,d,f,g,h,i,j,k,l,o)
|
|
@@ -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};
|
|
@@ -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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import k from"./L5OYOLWV.js";import{a as n,c as m}from"./NYFL2F5L.js";import"./YD5LVM7V.js";import j from"./AOT3PM2Q.js";import i from"./YGSDJ4V3.js";import h from"./M52LKZN7.js";import g from"./UXDRYDOD.js";import f from"./2H32MDP2.js";import"./OPQCY33W.js";import"./QAVDW7A7.js";import e from"./YSEHJQ4L.js";import"./7XVIZ7HK.js";import"./OKDXM5D4.js";import d from"./UP7RW5K2.js";import"./M5UMOOL2.js";import"./H6J65TWL.js";import"./XBWGOD6I.js";import c from"./J3T5HB77.js";import"./AGDGDULE.js";import"./FIZMK7GS.js";import"./LMAIOLS2.js";import"./7OQK2F7O.js";import b from"./Y3ZKMD47.js";import a 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 p,x as o}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import{a as l}from"./Q7BJGEFH.js";import"./V66TS2BB.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 h=(t,e)=>{let c=Array.from(t?.values()??[]).map(({fieldRegistry:s,layerItem:i})=>{let r=Array.from(s.values(),({name:u})=>u);return{title:i.title,description:i.description,fields:r.slice(0,10),additionalFieldCount:Math.max(r.length-10,0)}}),g=(e?.list()??[]).map(({agent:{description:s,id:i,name:r}})=>({id:i,name:r,description:s}));return JSON.stringify({layers:c,agents:g},null,2)},f=({config:t})=>{let e=t?.configurable?.services;return h(e?.layersAndFieldsRegistry,e?.agentRegistry)},y=[async()=>(await import("./ZEDDYT24.js")).default],d=l({id:"help",name:"Help Agent",description:"Answers questions about the current map, its layers and fields, and available assistant capabilities. Use for general help, unsupported map actions, and unrelated requests that should be redirected to map-related questions.",skillLoaders:y,modelTier:"default",systemPrompt:"You are an ArcGIS map help agent.",runtimeContextLoader:f});var a=class extends o{constructor(){super(...arguments),this.agent=d}static{this.properties={referenceElement:1}}#t;#e;getContext(){if(!this.#t)throw new Error("arcgis-assistant-help-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=n(this,"arcgis-assistant-help-agent"),this.#e=m(this)}disconnectedCallback(){this.#e?.unregister(this.agent.id),super.disconnectedCallback()}};p("arcgis-assistant-help-agent",a);return a},"intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/knowledgeGraphService",a,b,c,d,e,f,g,h,i,j,k)
|
|
@@ -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};
|
|
@@ -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{
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as n}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as n}from"./ZUKM4DGB.js";import"./FIZMK7GS.js";import"./SUMXIUIS.js";import"./PR4VMSKD.js";import{C as e,g as i,h as a,x as t}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var r=i`:host{display:contents}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.loading-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);padding:0 var(--calcite-spacing-sm)}.loading{display:flex;align-items:center;gap:var(--calcite-spacing-sm)}.text{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}.skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.skeleton-text{display:block;height:.95em;border-radius:var(--calcite-border-radius);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 1.2s ease-in-out infinite;width:85%}.skeleton-text:last-child{width:70%}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.skeleton-text{animation:none}}`,s=class extends t{constructor(){super(...arguments),this._messages=n({blocking:!0}),this.loading=!1,this.loadingMessage="",this.assistantAvatarEnabled=!1}static{this.properties={loading:5,loadingMessage:1,assistantAvatarEnabled:5,interrupts:0}}static{this.styles=r}render(){return this.loading?a`<arcgis-assistant-message .assistantAvatarEnabled=${this.assistantAvatarEnabled} footer-disabled>${this.assistantAvatarEnabled?a`<slot name=icon slot=icon><calcite-icon class="icon" icon=effects scale=s></calcite-icon></slot>`:null}<slot name=content slot=content><arcgis-assistant-interrupt-preview .interrupts=${this.interrupts}></arcgis-assistant-interrupt-preview><div class="loading-container"><div class="loading"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader><div class="text">${this.loadingMessage}</div></div><div class="skeleton-block"><span class="skeleton-text"></span><span class="skeleton-text"></span></div></div></slot></arcgis-assistant-message>`:null}};e("arcgis-assistant-message-loading",s);export{s as ArcgisAssistantMessageLoading};
|