@arcgis/ai-components 5.2.0-next.99 → 6.0.0-next.0
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.d.ts +18 -34
- package/dist/agent-utils/BaseAgent.js +53 -54
- package/dist/agent-utils/FunctionAgent.d.ts +11 -17
- package/dist/agent-utils/FunctionAgent.js +24 -60
- package/dist/agent-utils/LLMAgent.d.ts +18 -24
- package/dist/agent-utils/LLMAgent.js +71 -106
- package/dist/agent-utils/SkillAgent.d.ts +66 -0
- package/dist/agent-utils/SkillAgent.js +37 -0
- package/dist/agent-utils/WorkflowAgent.d.ts +10 -16
- package/dist/agent-utils/WorkflowAgent.js +19 -55
- package/dist/agent-utils/createSchema.d.ts +12 -0
- package/dist/agent-utils/createSchema.js +8 -0
- package/dist/agent-utils/middlewares/humanInTheLoop.d.ts +1 -1
- package/dist/agent-utils/middlewares/trace.js +8 -8
- package/dist/agent-utils/tools/FunctionTool.d.ts +8 -9
- package/dist/agent-utils/tools/FunctionTool.js +21 -52
- package/dist/agent-utils/types.d.ts +30 -34
- package/dist/agent-utils/workflows/BaseWorkflow.d.ts +6 -7
- package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/ConditionalWorkflow.js +14 -29
- package/dist/agent-utils/workflows/LoopWorkflow.d.ts +3 -7
- package/dist/agent-utils/workflows/LoopWorkflow.js +14 -29
- package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -6
- package/dist/agent-utils/workflows/ParallelWorkflow.js +69 -78
- package/dist/agent-utils/workflows/RouterWorkflow.d.ts +3 -3
- package/dist/agent-utils/workflows/RouterWorkflow.js +30 -47
- package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +1 -1
- package/dist/agent-utils/workflows/SequentialWorkflow.js +15 -27
- package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +3 -3
- package/dist/agent-utils/workflows/SwitchWorkflow.js +30 -49
- package/dist/agentic-workflow/jsonTypes.d.ts +116 -46
- package/dist/agents/agents/arcgisKnowledge/graph/arcgisKnowledgeGraph.d.ts +8 -0
- package/dist/{chunks → agents/agents/arcgisKnowledge/graph}/arcgisKnowledgeGraph.js +21 -29
- package/dist/agents/agents/dataExploration/dataExplorationAgent.d.ts +18 -0
- package/dist/agents/agents/dataExploration/dataExplorationAgent.js +17 -0
- package/dist/agents/agents/dataExplorationGraph/graph/dataExplorationGraph.d.ts +8 -0
- package/dist/{chunks → agents/agents/dataExplorationGraph/graph}/dataExplorationGraph.js +39 -46
- package/dist/agents/agents/help/helpAgent.d.ts +8 -0
- package/dist/agents/agents/help/helpAgent.js +32 -0
- package/dist/agents/agents/helpGraph/graph/helpGraph.d.ts +8 -0
- package/dist/{chunks → agents/agents/helpGraph/graph}/helpGraph.js +23 -32
- package/dist/agents/agents/layerStyling/context/layerStylingContext.d.ts +11 -0
- package/dist/agents/agents/layerStyling/context/layerStylingContext.js +5 -0
- package/dist/agents/agents/layerStyling/graph/layerStylingGraph.d.ts +8 -0
- package/dist/{chunks → agents/agents/layerStyling/graph}/layerStylingGraph.js +31 -40
- package/dist/agents/agents/navigation/navigationAgent.d.ts +18 -0
- package/dist/agents/agents/navigation/navigationAgent.js +25 -0
- package/dist/agents/agents/navigationGraph/graph/navigationGraph.d.ts +8 -0
- package/dist/{chunks → agents/agents/navigationGraph/graph}/navigationGraph.js +52 -61
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +4 -3
- package/dist/agents/tools/query/getStatistics/adapter.js +8 -7
- package/dist/agents/tools/query/getTopFeatures/adapter.js +123 -98
- package/dist/agents/tools/query/queryFeatures/adapter.js +4 -3
- package/dist/agents/tools/shared/resolveToolArtifact.d.ts +24 -0
- package/dist/agents/tools/shared/resolveToolArtifact.js +20 -0
- package/dist/agents/tools/shared/types.d.ts +22 -0
- package/dist/agents/tools/shared/types.js +6 -0
- package/dist/cdn/25CQLMB4.js +2 -0
- package/dist/cdn/{COH3QXWG.js → 2FUTKTNO.js} +2 -2
- package/dist/cdn/{5MK44FNO.js → 2GSHUAQ2.js} +1 -1
- package/dist/cdn/2UKFCF2J.js +150 -0
- package/dist/cdn/{MWYBF3F3.js → 2XXM52PS.js} +5 -5
- package/dist/cdn/{YEZ3AMNX.js → 2ZH5JNHL.js} +1 -1
- package/dist/cdn/34HKOU3T.js +2 -0
- package/dist/cdn/37EJSNE3.js +2 -0
- package/dist/cdn/3HV6OXCZ.js +2 -0
- package/dist/cdn/3WS4DSWD.js +2 -0
- package/dist/cdn/43OJZMBB.js +2 -0
- package/dist/cdn/46DT6BIG.js +68 -0
- package/dist/cdn/4BRIOLDJ.js +2 -0
- package/dist/cdn/4KFTUBFL.js +2 -0
- package/dist/cdn/{7SRLZQVC.js → 4OLV5LA7.js} +1 -1
- package/dist/cdn/4ZPGFIE2.js +2 -0
- package/dist/cdn/{22KHSDJI.js → 645SDZBB.js} +1 -1
- package/dist/cdn/{LLUGJKAQ.js → 6GQCLDLJ.js} +1 -1
- package/dist/cdn/6JCDY4FL.js +2 -0
- package/dist/cdn/74CVYM72.js +19 -0
- package/dist/cdn/7DRHB24Z.js +2 -0
- package/dist/cdn/{655YIKL3.js → 7GQCNR4P.js} +2 -2
- package/dist/cdn/7OQA4GCM.js +2 -0
- package/dist/cdn/A3KIOUWB.js +2 -0
- package/dist/cdn/AAUVOBPS.js +2 -0
- package/dist/cdn/AMFZY5QK.js +18 -0
- package/dist/cdn/B2JRBDJZ.js +2 -0
- package/dist/cdn/B4C7NIB5.js +23 -0
- package/dist/cdn/BIEX4MVV.js +9 -0
- package/dist/cdn/BKKLQUK2.js +2 -0
- package/dist/cdn/CADNOKIK.js +2 -0
- package/dist/cdn/CFAC4FN3.js +2 -0
- package/dist/cdn/DQRKGYR3.js +2 -0
- package/dist/cdn/DWMZ23QK.js +2 -0
- package/dist/cdn/{C4JT4S5E.js → DXCDVRGL.js} +1 -1
- package/dist/cdn/DYSPEU7W.js +2 -0
- package/dist/cdn/{5WYRJMBW.js → ENVTUTY6.js} +1 -1
- package/dist/cdn/EOSKJPQV.js +2 -0
- package/dist/cdn/EU6YSCZL.js +2 -0
- package/dist/cdn/EXIA3APU.js +75 -0
- package/dist/cdn/F7VQ3WH2.js +2 -0
- package/dist/cdn/FBIPIDP7.js +2 -0
- package/dist/cdn/FFWPUYGD.js +6 -0
- package/dist/cdn/FX4LV2S3.js +2 -0
- package/dist/cdn/{5HBAJ57P.js → FXRZCD5Y.js} +1 -1
- package/dist/cdn/GEFFWUB2.js +2 -0
- package/dist/cdn/GMZUN5SF.js +2 -0
- package/dist/cdn/{C4FEETBZ.js → GOET2CH4.js} +1 -1
- package/dist/cdn/GVFJHADC.js +2 -0
- package/dist/cdn/H7WJUUJT.js +2 -0
- package/dist/cdn/HWNPZ4CF.js +2 -0
- package/dist/cdn/I5OBL24F.js +2 -0
- package/dist/cdn/I7PHDOEQ.js +2 -0
- package/dist/cdn/{HHFNQR6Z.js → IEAHAC6B.js} +1 -1
- package/dist/cdn/ISDNOFHU.js +3 -0
- package/dist/cdn/J37GSI7C.js +2 -0
- package/dist/cdn/JZS6ZSWH.js +2 -0
- package/dist/cdn/KEBMHD4R.js +9 -0
- package/dist/cdn/KJZVYKWL.js +2 -0
- package/dist/cdn/KKXOSV62.js +2 -0
- package/dist/cdn/KPHHXMRK.js +2 -0
- package/dist/cdn/LCI5MEDN.js +2 -0
- package/dist/cdn/LVSIZRTB.js +2 -0
- package/dist/cdn/M7TMD2HP.js +41 -0
- package/dist/cdn/MHUEU6MR.js +2 -0
- package/dist/cdn/MPWEXYYB.js +2 -0
- package/dist/cdn/MQSOVP27.js +2 -0
- package/dist/cdn/NN6MELJ7.js +2 -0
- package/dist/cdn/O62IJLTZ.js +2 -0
- package/dist/cdn/OFM2S6U7.js +2 -0
- package/dist/cdn/{VXFQANGJ.js → OJP56R5R.js} +1 -1
- package/dist/cdn/{BL273EGZ.js → OT5ECP4V.js} +2 -0
- package/dist/cdn/OVIQ5NSE.js +2 -0
- package/dist/cdn/OYHYHALE.js +2 -0
- package/dist/cdn/{VOKXKU7M.js → Q6PCXSZT.js} +10 -10
- package/dist/cdn/QJOO6IIX.js +119 -0
- package/dist/cdn/QQPVN5MG.js +2 -0
- package/dist/cdn/QUZTFUWM.js +1 -0
- package/dist/cdn/RBRHDEOB.js +2 -0
- package/dist/cdn/REE4K4J7.js +2 -0
- package/dist/cdn/RFKOCMMT.js +2 -0
- package/dist/cdn/RKHDRUX5.js +2 -0
- package/dist/cdn/SBIYXWXZ.js +2 -0
- package/dist/cdn/T2FKFOHE.js +2 -0
- package/dist/cdn/{KWD2ECTM.js → TGI7QCB2.js} +1 -1
- package/dist/cdn/TPMZRJEC.js +2 -0
- package/dist/cdn/TRZJYWEB.js +33 -0
- package/dist/cdn/TTPTZBCM.js +2 -0
- package/dist/cdn/U3ZTF2BC.js +2 -0
- package/dist/cdn/U53SVXZK.js +3 -0
- package/dist/cdn/UALF45Q2.js +2 -0
- package/dist/cdn/{K2R6XVK3.js → UPSFL6U3.js} +1 -1
- package/dist/cdn/UYEF3IKE.js +44 -0
- package/dist/cdn/V6AQFRUC.js +2 -0
- package/dist/cdn/V7ERVXIO.js +2 -0
- package/dist/cdn/VIJVRJHL.js +2 -0
- package/dist/cdn/VVWKEN53.js +8 -0
- package/dist/cdn/W3OJTTVX.js +2 -0
- package/dist/cdn/W3ZLMBEE.js +155 -0
- package/dist/cdn/W6TS2TIE.js +2 -0
- package/dist/cdn/WB5AFS42.js +2 -0
- package/dist/cdn/WC6SHIEX.js +2 -0
- package/dist/cdn/WSIZ2OTL.js +2 -0
- package/dist/cdn/WVMQ3I6F.js +2 -0
- package/dist/cdn/XI4BPYGB.js +2 -0
- package/dist/cdn/{Z5W4V7RC.js → XJUYG2M3.js} +1 -1
- package/dist/cdn/XPSPAZUD.js +2 -0
- package/dist/cdn/XQ3NBBQ3.js +2 -0
- package/dist/cdn/{HHUQXL3R.js → YAUQJ6NV.js} +1 -1
- package/dist/cdn/YD3DLETZ.js +2 -0
- package/dist/cdn/YKKIJTJY.js +2 -0
- package/dist/cdn/YO3L3XIH.js +2 -0
- package/dist/cdn/YOQCQAKT.js +2 -0
- package/dist/cdn/ZBBI5M2X.js +14 -0
- package/dist/cdn/{KITIP6J2.js → ZBRZU4XB.js} +1 -1
- package/dist/cdn/{NNXISHCA.js → ZCNCYKXW.js} +2 -2
- package/dist/cdn/ZESTW6HJ.js +2 -0
- package/dist/cdn/ZKDCEL6K.js +2 -0
- package/dist/cdn/{6ECRQVHY.js → ZMMUAYDN.js} +1 -1
- package/dist/cdn/ZQTCPJUV.js +2 -0
- package/dist/cdn/ZS5P7NRI.js +2 -0
- package/dist/cdn/agent-utils/BaseAgent.js +2 -0
- package/dist/cdn/agent-utils/FunctionAgent.js +2 -0
- package/dist/cdn/agent-utils/LLMAgent.js +2 -0
- package/dist/cdn/agent-utils/SkillAgent.js +2 -0
- package/dist/cdn/agent-utils/WorkflowAgent.js +2 -0
- package/dist/cdn/agent-utils/createSchema.js +2 -0
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +1 -2
- package/dist/cdn/agent-utils/middlewares/middleware.js +1 -1
- package/dist/cdn/agent-utils/middlewares/trace.js +1 -1
- package/dist/cdn/agent-utils/tools/FunctionTool.js +2 -0
- package/dist/cdn/agent-utils/workflows/ConditionalWorkflow.js +2 -0
- package/dist/cdn/agent-utils/workflows/LoopWorkflow.js +2 -0
- package/dist/cdn/agent-utils/workflows/ParallelWorkflow.js +6 -0
- package/dist/cdn/agent-utils/workflows/RouterWorkflow.js +2 -0
- package/dist/cdn/agent-utils/workflows/SequentialWorkflow.js +2 -0
- package/dist/cdn/agent-utils/workflows/SwitchWorkflow.js +2 -0
- package/dist/cdn/assets/agents/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/agents/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-chat-entry/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/orchestrator/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/cdn/orchestrator/embeddings/getEmbeddings.js +2 -0
- package/dist/cdn/orchestrator/models/chatModel.js +2 -0
- package/dist/cdn/orchestrator/models/prompts.js +2 -0
- package/dist/cdn/orchestrator/signals.js +2 -0
- package/dist/cdn/orchestrator/state/runtime.js +2 -0
- package/dist/chunks/BaseWorkflow.js +52 -49
- package/dist/chunks/SKILL.js +5 -0
- package/dist/chunks/SKILL2.js +5 -0
- package/dist/chunks/SKILL3.js +22 -0
- package/dist/chunks/SKILL4.js +5 -0
- package/dist/chunks/adapter.js +20 -2156
- package/dist/chunks/adapter2.js +1129 -0
- package/dist/chunks/aiFactory.js +21 -0
- package/dist/chunks/aiUtilityService.js +29 -0
- package/dist/chunks/arcgisToolRegistry.js +92 -0
- package/dist/chunks/createSkillAgent.js +235 -0
- package/dist/chunks/fetchUtils.js +46 -0
- package/dist/chunks/getPrompt.js +32 -0
- package/dist/chunks/helpState.js +17 -0
- package/dist/chunks/intent_prompt.js +2 -0
- package/dist/chunks/layerQueryToolCalling.js +67 -0
- package/dist/chunks/layerStylingState.js +907 -0
- package/dist/chunks/localization.js +21 -0
- package/dist/chunks/modelConfig.js +12 -0
- package/dist/chunks/modelPricing.js +59 -0
- package/dist/chunks/navigationState.js +27 -0
- package/dist/chunks/observationSnapshot.js +110 -0
- package/dist/chunks/reducers.js +5 -0
- package/dist/chunks/requireAgentServices.js +11 -0
- package/dist/chunks/resolveGeometryFilter.js +149 -0
- package/dist/chunks/{baseAgentState.js → runtime2.js} +7 -6
- package/dist/chunks/runtimeSpans.js +103 -0
- package/dist/chunks/schema.js +45 -0
- package/dist/chunks/state.js +34 -23
- package/dist/chunks/textFormatters.js +8 -0
- package/dist/chunks/toolCallResponse.js +10 -23
- package/dist/chunks/utils.js +2 -2
- package/dist/chunks/utils2.js +15 -39
- package/dist/chunks/utils3.js +41 -10
- package/dist/chunks/webmapSchema.js +56 -0
- package/dist/components/arcgis-assistant/customElement.d.ts +54 -6
- package/dist/components/arcgis-assistant/customElement.js +268 -235
- package/dist/components/arcgis-assistant/types.d.ts +109 -1
- package/dist/components/arcgis-assistant-agent/customElement.d.ts +2 -2
- package/dist/components/arcgis-assistant-agent/customElement.js +330 -331
- package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +15 -4
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +344 -45
- package/dist/components/arcgis-assistant-chat-entry/index.js +3 -0
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +24 -19
- package/dist/components/arcgis-assistant-help-agent/customElement.js +14 -18
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -2
- package/dist/components/arcgis-assistant-interrupt/customElement.js +49 -15
- package/dist/components/arcgis-assistant-interrupt/index.js +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +19 -25
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +13 -19
- package/dist/components/arcgis-assistant-message-block/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-message-log/customElement.js +4 -4
- package/dist/components/arcgis-assistant-message-text/customElement.js +1 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +24 -19
- package/dist/components/arcgis-assistant-observation-inspector/customElement.d.ts +18 -0
- package/dist/components/arcgis-assistant-observation-inspector/customElement.js +90 -0
- package/dist/components/arcgis-assistant-observation-inspector/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-observation-inspector/index.js +14 -0
- package/dist/components/arcgis-assistant-observation-latency/customElement.d.ts +15 -0
- package/dist/components/arcgis-assistant-observation-latency/customElement.js +65 -0
- package/dist/components/arcgis-assistant-observation-latency/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-observation-latency/index.js +5 -0
- package/dist/components/arcgis-assistant-observation-panel/customElement.d.ts +28 -0
- package/dist/components/arcgis-assistant-observation-panel/customElement.js +68 -0
- package/dist/components/arcgis-assistant-observation-panel/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-observation-panel/index.js +7 -0
- package/dist/components/arcgis-assistant-observation-panel/support/modelPricing.d.ts +34 -0
- package/dist/components/arcgis-assistant-observation-panel/support/observationSnapshot.d.ts +63 -0
- package/dist/components/arcgis-assistant-observation-panel/support/runtimeSpans.d.ts +36 -0
- package/dist/components/arcgis-assistant-observation-run/customElement.d.ts +21 -0
- package/dist/components/arcgis-assistant-observation-run/customElement.js +43 -0
- package/dist/components/arcgis-assistant-observation-run/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-observation-run/index.js +7 -0
- package/dist/components/arcgis-assistant-observation-usage/customElement.d.ts +22 -0
- package/dist/components/arcgis-assistant-observation-usage/customElement.js +82 -0
- package/dist/components/arcgis-assistant-observation-usage/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-observation-usage/index.js +5 -0
- package/dist/components/assistant/assistant-agents/types.d.ts +19 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +20 -0
- package/dist/loader.js +11 -6
- package/dist/orchestrator/embeddings/cosineSimilarity.d.ts +12 -0
- package/dist/orchestrator/embeddings/cosineSimilarity.js +18 -0
- package/dist/orchestrator/embeddings/getEmbeddings.d.ts +7 -0
- package/dist/orchestrator/embeddings/getEmbeddings.js +12 -0
- package/dist/orchestrator/embeddings/webmapEmbeddings.d.ts +15 -0
- package/dist/orchestrator/embeddings/webmapEmbeddings.js +141 -0
- package/dist/orchestrator/embeddings/webmapSchema.d.ts +50 -0
- package/dist/orchestrator/models/chatModel.d.ts +22 -0
- package/dist/orchestrator/models/chatModel.js +19 -0
- package/dist/orchestrator/models/modelConfig.d.ts +2 -0
- package/dist/orchestrator/models/prompts.d.ts +105 -0
- package/dist/orchestrator/models/prompts.js +46 -0
- package/dist/orchestrator/orchestrator/orchestrator.d.ts +75 -0
- package/dist/orchestrator/orchestrator/orchestrator.js +977 -0
- package/dist/orchestrator/orchestrator/orchestratorEvents.d.ts +127 -33
- package/dist/orchestrator/orchestrator/orchestratorEvents.js +2 -0
- package/dist/orchestrator/providers/arcgis/aiFactory.d.ts +17 -0
- package/dist/orchestrator/registry/agentRegistry.d.ts +10 -0
- package/dist/orchestrator/services/fieldSearch.d.ts +17 -0
- package/dist/orchestrator/services/layerSearch.d.ts +18 -0
- package/dist/orchestrator/signals.d.ts +66 -0
- package/dist/orchestrator/signals.js +12 -0
- package/dist/orchestrator/state/runtime.d.ts +31 -0
- package/dist/orchestrator/state/runtime.js +8 -0
- package/dist/orchestrator/state/types.d.ts +67 -0
- package/dist/orchestrator/state/types.js +2 -0
- package/dist/orchestrator/types.d.ts +305 -0
- package/dist/orchestrator/types.js +2 -0
- package/dist/types/lumina.d.ts +27 -2
- package/dist/types/preact.d.ts +32 -2
- package/dist/types/react.d.ts +37 -2
- package/dist/types/stencil.d.ts +27 -2
- package/dist/utils/index.d.ts +167 -37
- package/dist/utils/index.js +40 -113
- package/package.json +36 -13
- package/dist/agent-utils/index.d.ts +0 -177
- package/dist/agent-utils/index.js +0 -167
- package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +0 -24
- package/dist/agentic-workflow/Edge.d.ts +0 -16
- package/dist/agentic-workflow/WebAgent.d.ts +0 -39
- package/dist/agentic-workflow/nodes/AgentNode.d.ts +0 -28
- package/dist/agentic-workflow/nodes/BaseNode.d.ts +0 -35
- package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +0 -25
- package/dist/agentic-workflow/nodes/StartNode.d.ts +0 -21
- package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +0 -21
- package/dist/agentic-workflow/types.d.ts +0 -29
- package/dist/cdn/2EY3BQQX.js +0 -2
- package/dist/cdn/2O4DON37.js +0 -2
- package/dist/cdn/3UEKINYC.js +0 -2
- package/dist/cdn/4OGR5QKS.js +0 -2
- package/dist/cdn/5FL5BTTX.js +0 -66
- package/dist/cdn/5K5ZY267.js +0 -2
- package/dist/cdn/5X7EG7D2.js +0 -2
- package/dist/cdn/5XZLS7UO.js +0 -2
- package/dist/cdn/5ZFUGNRN.js +0 -2
- package/dist/cdn/6OOZSZRJ.js +0 -2
- package/dist/cdn/6P44KOKX.js +0 -2
- package/dist/cdn/6YYPVU7H.js +0 -3
- package/dist/cdn/7BCQMK6D.js +0 -2
- package/dist/cdn/7V6OSTFC.js +0 -2
- package/dist/cdn/7VAQUCBU.js +0 -9
- package/dist/cdn/7VUSIGEM.js +0 -2
- package/dist/cdn/ACJTJLZN.js +0 -2
- package/dist/cdn/AI6DYOKR.js +0 -181
- package/dist/cdn/AKD5UOVX.js +0 -2
- package/dist/cdn/ANRQWYU2.js +0 -2
- package/dist/cdn/APFZY4PI.js +0 -2
- package/dist/cdn/B2JDVLA6.js +0 -2
- package/dist/cdn/BE7BRJZD.js +0 -2
- package/dist/cdn/CCC6LBMY.js +0 -2
- package/dist/cdn/CJMUJXPL.js +0 -2
- package/dist/cdn/CP5BVGJU.js +0 -2
- package/dist/cdn/D5UFYQHN.js +0 -44
- package/dist/cdn/EWLXNGKH.js +0 -208
- package/dist/cdn/EYOWRGDP.js +0 -2
- package/dist/cdn/F5NIRETW.js +0 -2
- package/dist/cdn/FG647IP6.js +0 -2
- package/dist/cdn/FJO4KNOZ.js +0 -2
- package/dist/cdn/FUF3NAU7.js +0 -2
- package/dist/cdn/FXP5UIQU.js +0 -156
- package/dist/cdn/G2EGT3CF.js +0 -6
- package/dist/cdn/G3SF6U2U.js +0 -2
- package/dist/cdn/G7OMHU2B.js +0 -2
- package/dist/cdn/HAEFC2SJ.js +0 -2
- package/dist/cdn/HDACNIZF.js +0 -2
- package/dist/cdn/IBZ2NEAO.js +0 -2
- package/dist/cdn/ICQCK5D3.js +0 -2
- package/dist/cdn/IJVMUS2L.js +0 -14
- package/dist/cdn/J6SZIQJA.js +0 -2
- package/dist/cdn/JCOA24UH.js +0 -3
- package/dist/cdn/JO5ETMPS.js +0 -2
- package/dist/cdn/LAYVGCPL.js +0 -44
- package/dist/cdn/MXTXJKFE.js +0 -2
- package/dist/cdn/MY47B3CE.js +0 -3
- package/dist/cdn/NZSOJ726.js +0 -2
- package/dist/cdn/O4NVW75A.js +0 -2
- package/dist/cdn/OE3GW5LE.js +0 -2
- package/dist/cdn/OX64WOEL.js +0 -22
- package/dist/cdn/PUHRBGKB.js +0 -2
- package/dist/cdn/Q57QWN5W.js +0 -2
- package/dist/cdn/QUKNPVAF.js +0 -2
- package/dist/cdn/R2PQVY4O.js +0 -2
- package/dist/cdn/RBE55SWR.js +0 -2
- package/dist/cdn/RHYNE5OE.js +0 -2
- package/dist/cdn/RLEHNAIA.js +0 -2
- package/dist/cdn/RVSTAUQS.js +0 -2
- package/dist/cdn/SXM4NUT5.js +0 -2
- package/dist/cdn/SZ2QSSB3.js +0 -2
- package/dist/cdn/T4RIGOXB.js +0 -2
- package/dist/cdn/TCH5I5LS.js +0 -2
- package/dist/cdn/TEPP7YPR.js +0 -2
- package/dist/cdn/TMVF2W5N.js +0 -36
- package/dist/cdn/UDRKUVZP.js +0 -2
- package/dist/cdn/UHNVDALX.js +0 -18
- package/dist/cdn/V6HOUZPZ.js +0 -2
- package/dist/cdn/VLLZ2FFU.js +0 -2
- package/dist/cdn/WGO5SER7.js +0 -6
- package/dist/cdn/WJXXOKGA.js +0 -9
- package/dist/cdn/WKTQVBFJ.js +0 -2
- package/dist/cdn/WSWB3B7B.js +0 -2
- package/dist/cdn/XX6GHMNR.js +0 -2
- package/dist/cdn/Y7XD7ZRD.js +0 -2
- package/dist/cdn/YLVJA4ZE.js +0 -2
- package/dist/cdn/Z5HWPSZN.js +0 -2
- package/dist/cdn/ZDV4K4WG.js +0 -2
- package/dist/cdn/ZOEMBHRF.js +0 -2
- package/dist/cdn/ZRVZMPFN.js +0 -2
- package/dist/cdn/agent-utils/index.js +0 -2
- package/dist/chunks/generateLayerDescriptions.js +0 -417
- package/dist/chunks/index.js +0 -11
- package/dist/chunks/orchestrator.js +0 -778
- package/dist/chunks/resolvePointGeometryFilter.js +0 -92
|
@@ -0,0 +1,1129 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { Annotation as G, messagesStateReducer as ee } from "@langchain/langgraph/web";
|
|
3
|
+
import { a as te } from "./runtime2.js";
|
|
4
|
+
import y from "zod";
|
|
5
|
+
import { tool as T } from "@langchain/core/tools";
|
|
6
|
+
import { sendTraceMessage as w } from "../orchestrator/signals.js";
|
|
7
|
+
import k from "@arcgis/core/portal/Portal.js";
|
|
8
|
+
import re from "@arcgis/core/WebLinkChart.js";
|
|
9
|
+
import W from "@arcgis/core/rest/knowledgeGraph/GraphQueryStreaming.js";
|
|
10
|
+
import * as ae from "@arcgis/core/core/reactiveUtils.js";
|
|
11
|
+
import { invokeStructuredPrompt as ne } from "../orchestrator/models/prompts.js";
|
|
12
|
+
import { fetchKnowledgeGraph as U, executeQueryStreaming as oe, executeSearchStreaming as se } from "@arcgis/core/rest/knowledgeGraphService.js";
|
|
13
|
+
import { g as D } from "./getPrompt.js";
|
|
14
|
+
import ie from "@arcgis/core/rest/knowledgeGraph/GraphSearchStreaming.js";
|
|
15
|
+
import B from "@arcgis/core/request.js";
|
|
16
|
+
import z from "@arcgis/core/identity/IdentityManager.js";
|
|
17
|
+
import { getBindParametersFromCypherQuery as ce } from "@arcgis/core/applications/KnowledgeStudio/generalSharedKgUtils.js";
|
|
18
|
+
const st = G.Root({
|
|
19
|
+
...te(),
|
|
20
|
+
intent: G({
|
|
21
|
+
reducer: (e, t) => t
|
|
22
|
+
}),
|
|
23
|
+
arcgisKnowledgeMessages: G({
|
|
24
|
+
reducer: ee,
|
|
25
|
+
default: () => []
|
|
26
|
+
}),
|
|
27
|
+
arcgisKnowledgeToolResult: G({
|
|
28
|
+
reducer: (e, t) => t,
|
|
29
|
+
default: () => null
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
function _(e) {
|
|
33
|
+
const t = e.map?.allLayers.filter((r) => r.type === "knowledge-graph");
|
|
34
|
+
if (!t || t?.length !== 1)
|
|
35
|
+
throw new Error("The Knowledge Agent currently only supports maps with exactly one Knowledge Graph Layer.");
|
|
36
|
+
}
|
|
37
|
+
function x(e) {
|
|
38
|
+
return !!e?.map && "activeLinkChartLayer" in e.map;
|
|
39
|
+
}
|
|
40
|
+
async function E(e) {
|
|
41
|
+
!x(e) || !e.map.diagramNodesExtent || await e.goTo(e.map.diagramNodesExtent);
|
|
42
|
+
}
|
|
43
|
+
function R(e) {
|
|
44
|
+
const r = e?.configurable?.context;
|
|
45
|
+
if (!r || typeof r != "object")
|
|
46
|
+
throw new Error("ArcgisKnowledgeAgent context missing");
|
|
47
|
+
if (!("view" in r))
|
|
48
|
+
throw new Error("View context missing");
|
|
49
|
+
const a = r.view;
|
|
50
|
+
return a.map && !("activeLinkChartLayer" in a.map) && _(a), {
|
|
51
|
+
view: a
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function it(e) {
|
|
55
|
+
const r = e?.configurable?.context;
|
|
56
|
+
if (H(e) === "knowledgeGraph")
|
|
57
|
+
return "knowledgeGraph";
|
|
58
|
+
const n = r.view;
|
|
59
|
+
return x(n) ? "linkChart" : (_(n), "map");
|
|
60
|
+
}
|
|
61
|
+
async function q(e) {
|
|
62
|
+
const r = e?.configurable?.context;
|
|
63
|
+
if (H(e) === "knowledgeGraph")
|
|
64
|
+
return r;
|
|
65
|
+
{
|
|
66
|
+
const n = r.view.map;
|
|
67
|
+
if (n && "activeLinkChartLayer" in n) {
|
|
68
|
+
const s = n.knowledgeGraph?.url;
|
|
69
|
+
if (!s)
|
|
70
|
+
throw new Error("Knowledge graph url missing from link chart.");
|
|
71
|
+
return {
|
|
72
|
+
knowledgeGraph: await U(s)
|
|
73
|
+
};
|
|
74
|
+
} else {
|
|
75
|
+
_(r.view);
|
|
76
|
+
const c = (r.view.map?.allLayers.find(
|
|
77
|
+
(i) => i.type === "knowledge-graph"
|
|
78
|
+
)).url;
|
|
79
|
+
if (!c)
|
|
80
|
+
throw new Error("Knowledge graph url missing from map.");
|
|
81
|
+
return {
|
|
82
|
+
knowledgeGraph: await U(c)
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function H(e) {
|
|
88
|
+
const r = e?.configurable?.context;
|
|
89
|
+
if (!r || typeof r != "object")
|
|
90
|
+
throw new Error("ArcgisKnowledgeAgent context missing");
|
|
91
|
+
if ("knowledgeGraph" in r && "view" in r)
|
|
92
|
+
throw new Error("Knowledge Graph context should only have a view or knowledgeGraph, but never both.");
|
|
93
|
+
if ("knowledgeGraph" in r)
|
|
94
|
+
return "knowledgeGraph";
|
|
95
|
+
if ("view" in r)
|
|
96
|
+
return "view";
|
|
97
|
+
throw new Error("ArcgisKnowledgeAgent context must have either a view or knowledgeGraph property.");
|
|
98
|
+
}
|
|
99
|
+
class pe {
|
|
100
|
+
constructor(t) {
|
|
101
|
+
this.dataModel = t, this.kind = "GraphQueryGenerationRequest", this.explainQuery = !0, this.schemaInformation = O.fromDataModel(t);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
class O {
|
|
105
|
+
constructor() {
|
|
106
|
+
this.schemaType = "ArcgisGraphSchema", this.entityTypes = [], this.relationshipTypes = [], this.identifierInfo = {
|
|
107
|
+
mappingInfo: {
|
|
108
|
+
identifierMapsTo: "UniformPropertyIdentifier",
|
|
109
|
+
identifierPropertyName: "globalid"
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
static fromDataModel(t) {
|
|
114
|
+
const r = new O();
|
|
115
|
+
for (const a of t.entityTypes)
|
|
116
|
+
r.entityTypes.push(N.fromEntityType(a));
|
|
117
|
+
for (const a of t.relationshipTypes)
|
|
118
|
+
r.relationshipTypes.push(le.fromRelationshipType(a));
|
|
119
|
+
return r.identifierInfo = {
|
|
120
|
+
mappingInfo: {
|
|
121
|
+
identifierMapsTo: ue(
|
|
122
|
+
t.identifierInfo.identifierMappingInfo.identifierInfoType
|
|
123
|
+
),
|
|
124
|
+
identifierPropertyName: t.identifierInfo.identifierMappingInfo.uniformPropertyIdentifier.identifierPropertyName
|
|
125
|
+
}
|
|
126
|
+
}, r.spatialReference = JSON.parse(JSON.stringify(t.spatialReference)), r;
|
|
127
|
+
}
|
|
128
|
+
// Generates a short summary of the types in the data model for LLM consumption.
|
|
129
|
+
static getDataModelTypesSummary(t) {
|
|
130
|
+
const r = t.entityTypes.map((n) => n.name).join(", "), a = t.relationshipTypes.map((n) => n.name).join(", ");
|
|
131
|
+
return `Entity Types: ${r}.
|
|
132
|
+
Relationship Types: ${a}.`;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
class N {
|
|
136
|
+
constructor() {
|
|
137
|
+
this.name = "", this.properties = [];
|
|
138
|
+
}
|
|
139
|
+
static fromEntityType(t) {
|
|
140
|
+
const r = new N();
|
|
141
|
+
r.name = t.name, r.alias = t.alias ? t.alias : void 0, r.role = he(t.role);
|
|
142
|
+
for (const a of t.properties) {
|
|
143
|
+
const n = {
|
|
144
|
+
name: a.name,
|
|
145
|
+
alias: a.alias ? a.alias : void 0,
|
|
146
|
+
fieldType: a.fieldType,
|
|
147
|
+
role: de(a.role),
|
|
148
|
+
geometryDef: a.fieldType === "esriFieldTypeGeometry" ? {
|
|
149
|
+
geometryType: a.geometryType ?? "esriGeometryAny",
|
|
150
|
+
hasM: a.hasM ? a.hasM : void 0,
|
|
151
|
+
hasZ: a.hasZ ? a.hasZ : void 0
|
|
152
|
+
} : void 0
|
|
153
|
+
};
|
|
154
|
+
r.properties.push(n);
|
|
155
|
+
}
|
|
156
|
+
return r;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
class le extends N {
|
|
160
|
+
constructor() {
|
|
161
|
+
super(...arguments), this.observedEndPoints = [];
|
|
162
|
+
}
|
|
163
|
+
static fromRelationshipType(t) {
|
|
164
|
+
const r = N.fromEntityType(t);
|
|
165
|
+
r.observedEndPoints = [];
|
|
166
|
+
for (const a of t.endPoints)
|
|
167
|
+
r.observedEndPoints.push({
|
|
168
|
+
originEntityType: a.originEntityType,
|
|
169
|
+
destinationEntityType: a.destinationEntityType
|
|
170
|
+
});
|
|
171
|
+
return r;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
const ue = (e) => {
|
|
175
|
+
switch (e) {
|
|
176
|
+
case "esriIdentifierInfoTypeUNSPECIFIED":
|
|
177
|
+
return "UNSPECIFIED";
|
|
178
|
+
case "esriIdentifierInfoTypeDatabaseNative":
|
|
179
|
+
return "DatabaseNative";
|
|
180
|
+
case "esriIdentifierInfoTypeUniformProperty":
|
|
181
|
+
return "UniformPropertyIdentifier";
|
|
182
|
+
default:
|
|
183
|
+
return e;
|
|
184
|
+
}
|
|
185
|
+
}, he = (e) => {
|
|
186
|
+
switch (e) {
|
|
187
|
+
case "Regular":
|
|
188
|
+
return "esriGraphNamedObjectRegular";
|
|
189
|
+
case "Provenance":
|
|
190
|
+
return "esriGraphNamedObjectProvenance";
|
|
191
|
+
case "Document":
|
|
192
|
+
return "esriGraphNamedObjectDocument";
|
|
193
|
+
default:
|
|
194
|
+
return e;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
function de(e) {
|
|
198
|
+
switch (e) {
|
|
199
|
+
case "esriGraphPropertyRegular":
|
|
200
|
+
return "Regular";
|
|
201
|
+
case "esriGraphPropertyDocumentName":
|
|
202
|
+
return "Document_Name";
|
|
203
|
+
case "esriGraphPropertyDocumentTitle":
|
|
204
|
+
return "Document_Title";
|
|
205
|
+
case "esriGraphPropertyDocumentUrl":
|
|
206
|
+
return "Document_Url";
|
|
207
|
+
case "esriGraphPropertyDocumentText":
|
|
208
|
+
return "Document_Text";
|
|
209
|
+
case "esriGraphPropertyDocumentKeywords":
|
|
210
|
+
return "Document_Keywords";
|
|
211
|
+
case "esriGraphPropertyDocumentContentType":
|
|
212
|
+
return "Document_ContentType";
|
|
213
|
+
case "esriGraphPropertyDocumentMetadata":
|
|
214
|
+
return "Document_Metadata";
|
|
215
|
+
case "esriGraphPropertyDocumentFileExtension":
|
|
216
|
+
return "Document_FileExtension";
|
|
217
|
+
case "esriGraphPropertyProvenanceInstanceId":
|
|
218
|
+
return "Provenance_InstanceId";
|
|
219
|
+
case "esriGraphPropertyProvenanceSourceType":
|
|
220
|
+
return "Provenance_SourceType";
|
|
221
|
+
case "esriGraphPropertyProvenanceSourceName":
|
|
222
|
+
return "Provenance_SourceName";
|
|
223
|
+
case "esriGraphPropertyProvenanceSource":
|
|
224
|
+
return "Provenance_Source";
|
|
225
|
+
case "esriGraphPropertyProvenanceComment":
|
|
226
|
+
return "Provenance_Comment";
|
|
227
|
+
case "esriGraphPropertyProvenanceTypeName":
|
|
228
|
+
return "Provenance_TypeName";
|
|
229
|
+
case "esriGraphPropertyProvenancePropertyName":
|
|
230
|
+
return "Provenance_PropertyName";
|
|
231
|
+
default:
|
|
232
|
+
return "Regular";
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function M(e) {
|
|
236
|
+
return e?.signal;
|
|
237
|
+
}
|
|
238
|
+
async function ye(e, t) {
|
|
239
|
+
const r = await D("arcgis_knowledge_cypher_query_prompt");
|
|
240
|
+
return t ? `${e} ${r}
|
|
241
|
+
|
|
242
|
+
Your previous attempt to generate a cypher query failed. See the details below and generate a new cypher query that avoids this error.
|
|
243
|
+
|
|
244
|
+
Attempt Number: ${t.attemptCount}
|
|
245
|
+
Execution Error: ${t.executionError}
|
|
246
|
+
Failed Query:
|
|
247
|
+
${t.failedGraphQuery}` : `${e} ${r}`;
|
|
248
|
+
}
|
|
249
|
+
async function me(e, t, r, a) {
|
|
250
|
+
const { graphQuery: n, explanation: s } = await K(e, t, r, a);
|
|
251
|
+
return { graphQuery: n, explanation: s };
|
|
252
|
+
}
|
|
253
|
+
async function K(e, t, r, a, n) {
|
|
254
|
+
const s = {
|
|
255
|
+
message: await ye(e, n),
|
|
256
|
+
context: new pe(t)
|
|
257
|
+
}, c = M(a);
|
|
258
|
+
await w({ text: "Attempting to generate a cypher query from your prompt..." }, a);
|
|
259
|
+
const o = await B(`${r}/chat`, {
|
|
260
|
+
method: "post",
|
|
261
|
+
body: JSON.stringify(s),
|
|
262
|
+
headers: {
|
|
263
|
+
"Content-Type": "application/json",
|
|
264
|
+
"X-Esri-Authorization": `Bearer ${z.findCredential(k.getDefault().url)?.token ?? ""}`
|
|
265
|
+
},
|
|
266
|
+
signal: c
|
|
267
|
+
});
|
|
268
|
+
if (o.httpStatus !== 200)
|
|
269
|
+
throw new Error(`Graph query service returned an error: ${o.httpStatus}`, {
|
|
270
|
+
cause: o.data
|
|
271
|
+
});
|
|
272
|
+
let i = !1;
|
|
273
|
+
const h = Date.now();
|
|
274
|
+
let p = o.data.sequenceNumber, l = "", u = "", m = 1;
|
|
275
|
+
for (; !i; ) {
|
|
276
|
+
await new Promise((g) => setTimeout(g, 1e3)), await w(
|
|
277
|
+
{ text: `Periodically requesting status of job from ArcGIS AI Services${"...".substring(0, m)}` },
|
|
278
|
+
a
|
|
279
|
+
), m = m % 3 + 1;
|
|
280
|
+
const d = await B(`${r}/chat`, {
|
|
281
|
+
method: "post",
|
|
282
|
+
body: JSON.stringify({
|
|
283
|
+
conversationId: o.data.conversationId,
|
|
284
|
+
inquiryId: o.data.inquiryId,
|
|
285
|
+
ackSequenceNumber: p
|
|
286
|
+
}),
|
|
287
|
+
headers: {
|
|
288
|
+
"Content-Type": "application/json",
|
|
289
|
+
"X-Esri-Authorization": `Bearer ${z.findCredential(k.getDefault().url)?.token ?? ""}`
|
|
290
|
+
},
|
|
291
|
+
signal: c
|
|
292
|
+
});
|
|
293
|
+
if (d.httpStatus !== 200)
|
|
294
|
+
throw new Error(`Graph query service polling returned an error: ${d.httpStatus}`, {
|
|
295
|
+
cause: d.data
|
|
296
|
+
});
|
|
297
|
+
if (d.data.context?.kind) {
|
|
298
|
+
if (d.data.context.kind !== "GraphQueryGenerationResponse")
|
|
299
|
+
throw new Error(`Unexpected response from graph query service polling. Message: ${d.data.message}`, {
|
|
300
|
+
cause: d.data
|
|
301
|
+
});
|
|
302
|
+
l = d.data.context.graphQuery, u = d.data.message || "", i = !0;
|
|
303
|
+
} else if (!d.data.hasMore)
|
|
304
|
+
i = !0;
|
|
305
|
+
else if (Date.now() - h > 6e4)
|
|
306
|
+
throw new Error("Graph query service polling timed out after 1 minute.");
|
|
307
|
+
p = d.data.sequenceNumber;
|
|
308
|
+
}
|
|
309
|
+
return { graphQuery: l, explanation: u };
|
|
310
|
+
}
|
|
311
|
+
function ge(e, t) {
|
|
312
|
+
v(e, (r) => {
|
|
313
|
+
t.set(`${r.typeName}__${r.id}`, {
|
|
314
|
+
id: r.id,
|
|
315
|
+
typeName: r.typeName
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
function v(e, t) {
|
|
320
|
+
if (!(!e || typeof e != "object")) {
|
|
321
|
+
if (we(e))
|
|
322
|
+
for (const r of e.path)
|
|
323
|
+
v(r, t);
|
|
324
|
+
else if (fe(e))
|
|
325
|
+
t(e);
|
|
326
|
+
else if (Array.isArray(e))
|
|
327
|
+
for (const r of e)
|
|
328
|
+
v(r, t);
|
|
329
|
+
else if (be(e))
|
|
330
|
+
for (const r of Object.values(e.properties ?? {}))
|
|
331
|
+
v(r, t);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
function fe(e) {
|
|
335
|
+
return !e || typeof e != "object" || Array.isArray(e) ? !1 : "id" in e && "typeName" in e;
|
|
336
|
+
}
|
|
337
|
+
function we(e) {
|
|
338
|
+
return !e || typeof e != "object" || Array.isArray(e) ? !1 : e && "path" in e && Array.isArray(e.path);
|
|
339
|
+
}
|
|
340
|
+
function be(e) {
|
|
341
|
+
return !e || typeof e != "object" || Array.isArray(e) || "id" in e ? !1 : "properties" in e && typeof e.properties == "object";
|
|
342
|
+
}
|
|
343
|
+
function Te(e, t) {
|
|
344
|
+
const r = [], a = [], n = [
|
|
345
|
+
[t.dataModel.entityTypes, r],
|
|
346
|
+
[t.dataModel.relationshipTypes, a]
|
|
347
|
+
];
|
|
348
|
+
for (const [s, c] of n)
|
|
349
|
+
for (const o of s) {
|
|
350
|
+
const i = e.getMemberIdsByType(o.name);
|
|
351
|
+
c.push(...i);
|
|
352
|
+
}
|
|
353
|
+
return { entityIds: r, relationshipIds: a };
|
|
354
|
+
}
|
|
355
|
+
function xe(e, t) {
|
|
356
|
+
const r = { entityIds: new Array(), relationshipIds: new Array() }, a = [], s = e?.allLayers.find((i) => i.type === "knowledge-graph")?.inclusionModeDefinition;
|
|
357
|
+
if (!s)
|
|
358
|
+
return { allNamedTypesFullyDynamic: !0, bindParameters: r, nonDynamicTypes: a };
|
|
359
|
+
const c = [
|
|
360
|
+
[t.dataModel.entityTypes, r.entityIds],
|
|
361
|
+
[t.dataModel.relationshipTypes, r.relationshipIds]
|
|
362
|
+
];
|
|
363
|
+
let o = !0;
|
|
364
|
+
for (const [i, h] of c)
|
|
365
|
+
for (const p of i) {
|
|
366
|
+
const l = s.namedTypeDefinitions.get(p.name);
|
|
367
|
+
if (!l) {
|
|
368
|
+
o = !1, a.push(p.name);
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
371
|
+
if (!l.useAllData) {
|
|
372
|
+
o = !1, a.push(p.name);
|
|
373
|
+
for (const [u] of l.members || [])
|
|
374
|
+
h.push(u);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
return { allNamedTypesFullyDynamic: o, bindParameters: r, nonDynamicTypes: a };
|
|
378
|
+
}
|
|
379
|
+
const P = 3;
|
|
380
|
+
function J(e, t = 100) {
|
|
381
|
+
const r = {};
|
|
382
|
+
for (const a of Object.entries(e.properties ?? {})) {
|
|
383
|
+
const [n, s] = a;
|
|
384
|
+
typeof s == "string" && s.length > t ? r[n] = `${s.slice(0, t)}... (truncated, original length: ${s.length})` : r[n] = s;
|
|
385
|
+
}
|
|
386
|
+
return e.properties = r, e;
|
|
387
|
+
}
|
|
388
|
+
function C(e) {
|
|
389
|
+
return typeof e != "object" || e === null ? String(e) : "details" in e && typeof e.details == "object" && e.details !== null && "errorMessage" in e.details && typeof e.details.errorMessage == "string" ? e.details.errorMessage : "message" in e && typeof e.message == "string" ? e.message : String(e);
|
|
390
|
+
}
|
|
391
|
+
const ve = async ({
|
|
392
|
+
kg: e,
|
|
393
|
+
queryParams: t,
|
|
394
|
+
targetStructure: r,
|
|
395
|
+
targetStructureReducer: a,
|
|
396
|
+
requestOptions: n,
|
|
397
|
+
queryRowLimit: s,
|
|
398
|
+
queryTimeoutMs: c
|
|
399
|
+
}) => {
|
|
400
|
+
let o = null, i = r;
|
|
401
|
+
const h = new AbortController(), p = n?.signal, l = () => {
|
|
402
|
+
h.abort(p?.reason);
|
|
403
|
+
};
|
|
404
|
+
p && (p.aborted ? h.abort(p.reason) : p.addEventListener("abort", l, { once: !0 }));
|
|
405
|
+
try {
|
|
406
|
+
const u = await oe(e, t, n);
|
|
407
|
+
o = u.resultHeader;
|
|
408
|
+
const m = u.resultRowsStream.getReader();
|
|
409
|
+
let d = 0;
|
|
410
|
+
const g = Date.now(), f = !1;
|
|
411
|
+
for (; ; ) {
|
|
412
|
+
const { done: b, value: S } = await m.read();
|
|
413
|
+
if (b)
|
|
414
|
+
break;
|
|
415
|
+
if (!f && c && Date.now() - g > c)
|
|
416
|
+
return h.abort(), { type: "timeout" };
|
|
417
|
+
for (const Z of S) {
|
|
418
|
+
if (d++, s && d > s)
|
|
419
|
+
return h.abort(), { type: "success", rowLimitReached: !0, resultHeader: o, processedResult: i };
|
|
420
|
+
i = a(i, Z);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
} catch (u) {
|
|
424
|
+
return h.signal.aborted ? { type: "aborted" } : { type: "error", errorMessage: C(u), error: u };
|
|
425
|
+
} finally {
|
|
426
|
+
p?.removeEventListener("abort", l);
|
|
427
|
+
}
|
|
428
|
+
return { type: "success", rowLimitReached: !1, resultHeader: o, processedResult: i };
|
|
429
|
+
};
|
|
430
|
+
async function V({
|
|
431
|
+
prompt: e,
|
|
432
|
+
bindParameters: t,
|
|
433
|
+
kg: r,
|
|
434
|
+
graphQueryServiceUrl: a,
|
|
435
|
+
targetStructure: n,
|
|
436
|
+
targetStructureReducer: s,
|
|
437
|
+
requestOptions: c,
|
|
438
|
+
queryRowLimit: o,
|
|
439
|
+
queryTimeoutMs: i,
|
|
440
|
+
config: h
|
|
441
|
+
}) {
|
|
442
|
+
let p;
|
|
443
|
+
for (let l = 1; l <= P; l++) {
|
|
444
|
+
let u;
|
|
445
|
+
try {
|
|
446
|
+
u = await K(e, r.dataModel, a, h, p);
|
|
447
|
+
} catch (f) {
|
|
448
|
+
return {
|
|
449
|
+
type: "generation-error",
|
|
450
|
+
errorMessage: C(f),
|
|
451
|
+
error: f
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
await w(
|
|
455
|
+
{
|
|
456
|
+
text: `Attempting to execute query: ${u.graphQuery.substring(0, 500)}${u.graphQuery.length > 500 ? "..." : ""}`
|
|
457
|
+
},
|
|
458
|
+
h
|
|
459
|
+
);
|
|
460
|
+
const m = await Pe(u.graphQuery, t), d = await ve({
|
|
461
|
+
kg: r,
|
|
462
|
+
queryParams: new W({
|
|
463
|
+
openCypherQuery: u.graphQuery,
|
|
464
|
+
bindParameters: m
|
|
465
|
+
}),
|
|
466
|
+
targetStructure: n,
|
|
467
|
+
targetStructureReducer: s,
|
|
468
|
+
requestOptions: c,
|
|
469
|
+
queryRowLimit: o,
|
|
470
|
+
queryTimeoutMs: i
|
|
471
|
+
}), g = d.type === "aborted" ? "Query execution was aborted." : d.type === "timeout" ? "Query execution timed out." : d.type === "error" ? `Query failed with error: ${d.errorMessage}` : "";
|
|
472
|
+
if (d.type === "success")
|
|
473
|
+
return {
|
|
474
|
+
type: "success",
|
|
475
|
+
graphQuery: u.graphQuery,
|
|
476
|
+
explanation: u.explanation,
|
|
477
|
+
rowLimitReached: d.rowLimitReached,
|
|
478
|
+
resultHeader: d.resultHeader,
|
|
479
|
+
processedResult: d.processedResult
|
|
480
|
+
};
|
|
481
|
+
if (d.type === "aborted")
|
|
482
|
+
return {
|
|
483
|
+
type: "aborted",
|
|
484
|
+
errorMessage: g,
|
|
485
|
+
graphQuery: u.graphQuery,
|
|
486
|
+
explanation: u.explanation
|
|
487
|
+
};
|
|
488
|
+
if (l >= P)
|
|
489
|
+
return d.type === "timeout" ? {
|
|
490
|
+
type: "timeout",
|
|
491
|
+
errorMessage: g,
|
|
492
|
+
graphQuery: u.graphQuery,
|
|
493
|
+
explanation: u.explanation
|
|
494
|
+
} : {
|
|
495
|
+
type: "execution-error",
|
|
496
|
+
errorMessage: g,
|
|
497
|
+
error: d.error,
|
|
498
|
+
graphQuery: u.graphQuery,
|
|
499
|
+
explanation: u.explanation
|
|
500
|
+
};
|
|
501
|
+
p = {
|
|
502
|
+
failedGraphQuery: u.graphQuery,
|
|
503
|
+
executionError: g,
|
|
504
|
+
attemptCount: l
|
|
505
|
+
}, await w(
|
|
506
|
+
{ text: `Attempt ${l} failed with error: ${g}. Retrying...` },
|
|
507
|
+
h
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
throw new Error(
|
|
511
|
+
`Failed to execute generated cypher due to an unexpected error after ${P} attempts.`
|
|
512
|
+
);
|
|
513
|
+
}
|
|
514
|
+
const Pe = async (e, t) => {
|
|
515
|
+
if (!t)
|
|
516
|
+
return {};
|
|
517
|
+
const { bindParameters: r, parseErrors: a } = await ce(e);
|
|
518
|
+
if (a)
|
|
519
|
+
return t;
|
|
520
|
+
const n = {};
|
|
521
|
+
for (const s of r)
|
|
522
|
+
s in t && (n[s] = t[s]);
|
|
523
|
+
return n;
|
|
524
|
+
}, ke = async ({
|
|
525
|
+
kg: e,
|
|
526
|
+
searchQuery: t,
|
|
527
|
+
typeCategoryFilter: r,
|
|
528
|
+
namedTypesFilter: a,
|
|
529
|
+
searchResultLimit: n,
|
|
530
|
+
requestOptions: s
|
|
531
|
+
}) => {
|
|
532
|
+
const c = [];
|
|
533
|
+
let o = [r];
|
|
534
|
+
r === "both" && !e.serviceDefinition.serviceCapabilities.searchCapabilities.searchTypeFilterCapabilities.includes("esriTypeBoth") && (o = ["entity", "relationship"]);
|
|
535
|
+
const i = n ?? 1 / 0;
|
|
536
|
+
try {
|
|
537
|
+
for (const h of o) {
|
|
538
|
+
const p = i - c.length;
|
|
539
|
+
if (p <= 0)
|
|
540
|
+
break;
|
|
541
|
+
const m = (await se(
|
|
542
|
+
e,
|
|
543
|
+
new ie({
|
|
544
|
+
searchQuery: t,
|
|
545
|
+
typeCategoryFilter: h,
|
|
546
|
+
namedTypesFilter: a ?? void 0,
|
|
547
|
+
num: p
|
|
548
|
+
}),
|
|
549
|
+
s
|
|
550
|
+
)).resultRowsStream.getReader();
|
|
551
|
+
let d = !1;
|
|
552
|
+
for (; !d; ) {
|
|
553
|
+
const { done: g, value: f } = await m.read();
|
|
554
|
+
if (g) {
|
|
555
|
+
d = !0;
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
for (const b of f)
|
|
559
|
+
for (const S of b)
|
|
560
|
+
c.push(S);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
} catch (h) {
|
|
564
|
+
const p = C(h);
|
|
565
|
+
return s?.signal?.aborted ? {
|
|
566
|
+
type: "aborted",
|
|
567
|
+
errorMessage: p,
|
|
568
|
+
error: h
|
|
569
|
+
} : { type: "error", errorMessage: p, error: h };
|
|
570
|
+
}
|
|
571
|
+
return {
|
|
572
|
+
type: "success",
|
|
573
|
+
results: c
|
|
574
|
+
};
|
|
575
|
+
}, X = "IMPORTANT: The generated cypher query must return entire entities and relationships ONLY.";
|
|
576
|
+
async function Y({
|
|
577
|
+
prompt: e,
|
|
578
|
+
view: t,
|
|
579
|
+
knowledgeGraph: r,
|
|
580
|
+
includeReturnEntityAndRelationshipContext: a = !1
|
|
581
|
+
}) {
|
|
582
|
+
const n = [e];
|
|
583
|
+
if (a && n.push(X), x(t)) {
|
|
584
|
+
const p = await D("arcgis_knowledge_current_lc_context"), l = Te(t.map, r);
|
|
585
|
+
return n.push(p), {
|
|
586
|
+
enhancedPrompt: n.join(`
|
|
587
|
+
|
|
588
|
+
`),
|
|
589
|
+
bindParameters: l,
|
|
590
|
+
allNamedTypesFullyDynamic: !1
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
const s = t.map, { allNamedTypesFullyDynamic: c, bindParameters: o, nonDynamicTypes: i } = xe(
|
|
594
|
+
s,
|
|
595
|
+
r
|
|
596
|
+
);
|
|
597
|
+
if (c)
|
|
598
|
+
return {
|
|
599
|
+
enhancedPrompt: n.join(`
|
|
600
|
+
|
|
601
|
+
`),
|
|
602
|
+
bindParameters: o,
|
|
603
|
+
allNamedTypesFullyDynamic: !0
|
|
604
|
+
};
|
|
605
|
+
const h = (await D("arcgis_knowledge_current_map_context")).replaceAll(
|
|
606
|
+
"{nonDynamicTypes}",
|
|
607
|
+
JSON.stringify(i)
|
|
608
|
+
);
|
|
609
|
+
return n.push(h), {
|
|
610
|
+
enhancedPrompt: n.join(`
|
|
611
|
+
|
|
612
|
+
`),
|
|
613
|
+
bindParameters: o,
|
|
614
|
+
allNamedTypesFullyDynamic: c
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
async function Ce(e, t, r, a, n, s) {
|
|
618
|
+
const { view: c } = n, o = await V({
|
|
619
|
+
prompt: e,
|
|
620
|
+
bindParameters: t,
|
|
621
|
+
kg: r,
|
|
622
|
+
graphQueryServiceUrl: a,
|
|
623
|
+
targetStructure: /* @__PURE__ */ new Map(),
|
|
624
|
+
targetStructureReducer: (u, m) => {
|
|
625
|
+
for (const d of m)
|
|
626
|
+
ge(d, u);
|
|
627
|
+
return u;
|
|
628
|
+
},
|
|
629
|
+
requestOptions: {
|
|
630
|
+
signal: M(s),
|
|
631
|
+
timeout: s?.timeout
|
|
632
|
+
},
|
|
633
|
+
config: s
|
|
634
|
+
});
|
|
635
|
+
if (o.type !== "success") {
|
|
636
|
+
const u = o.type === "generation-error" ? o.errorMessage : `${o.errorMessage} Cypher query: ${o.graphQuery}`;
|
|
637
|
+
throw new Error(`Failed to add records to the link chart. ${u}`);
|
|
638
|
+
}
|
|
639
|
+
const { graphQuery: i, explanation: h, processedResult: p } = o, l = Array.from(p.values());
|
|
640
|
+
return await w(
|
|
641
|
+
{
|
|
642
|
+
text: `Query Results parsed into ${l.length} unique relationships and entities. Atempting to add to link chart...`
|
|
643
|
+
},
|
|
644
|
+
s
|
|
645
|
+
), x(c) ? (await c.map.addRecords(l), await E(c), { generatedQuery: i, explanation: h, addedIdTypePairs: l }) : (await c?.map?.allLayers.find(
|
|
646
|
+
(m) => m.type === "knowledge-graph"
|
|
647
|
+
)?.addRecords(l), { generatedQuery: i, explanation: h, addedIdTypePairs: l });
|
|
648
|
+
}
|
|
649
|
+
const $ = "addRecords", Se = y.object({
|
|
650
|
+
prompt: y.string().describe(
|
|
651
|
+
"The user's inquiry and context required in order to generate a cypher query that will be used to add records to the link chart."
|
|
652
|
+
)
|
|
653
|
+
}), Ne = async ({ prompt: e }, t) => {
|
|
654
|
+
const { knowledgeGraph: r } = await q(t), a = R(t), { view: n } = a, c = k.getDefault().helperServices, {
|
|
655
|
+
enhancedPrompt: o,
|
|
656
|
+
bindParameters: i,
|
|
657
|
+
allNamedTypesFullyDynamic: h
|
|
658
|
+
} = await Y({
|
|
659
|
+
prompt: e,
|
|
660
|
+
view: n,
|
|
661
|
+
knowledgeGraph: r,
|
|
662
|
+
includeReturnEntityAndRelationshipContext: !0
|
|
663
|
+
});
|
|
664
|
+
if (h)
|
|
665
|
+
return {
|
|
666
|
+
toolName: $,
|
|
667
|
+
status: "success",
|
|
668
|
+
summary: "No records have been added to the map because all data in the knowledge graph is contained in the map.",
|
|
669
|
+
details: {
|
|
670
|
+
generatedQuery: "N/A",
|
|
671
|
+
explanation: "All named types in the knowledge graph are fully dynamic and therefore all data is already contained in the map. No records have been added.",
|
|
672
|
+
addedIdTypePairs: []
|
|
673
|
+
}
|
|
674
|
+
};
|
|
675
|
+
try {
|
|
676
|
+
const { generatedQuery: p, explanation: l, addedIdTypePairs: u } = await Ce(
|
|
677
|
+
o,
|
|
678
|
+
i,
|
|
679
|
+
r,
|
|
680
|
+
`${c.aiAssistantServices.url}${c.aiAssistantServices.graphQueryAssistant}`,
|
|
681
|
+
a,
|
|
682
|
+
t
|
|
683
|
+
);
|
|
684
|
+
return {
|
|
685
|
+
toolName: $,
|
|
686
|
+
status: "success",
|
|
687
|
+
summary: `Records added successfully. Cypher Query used: ${p}
|
|
688
|
+
|
|
689
|
+
Number of records added: ${u.length}`,
|
|
690
|
+
details: {
|
|
691
|
+
generatedQuery: p,
|
|
692
|
+
explanation: l,
|
|
693
|
+
addedIdTypePairs: u
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
} catch (p) {
|
|
697
|
+
const l = C(p);
|
|
698
|
+
return {
|
|
699
|
+
toolName: $,
|
|
700
|
+
status: "error",
|
|
701
|
+
errorMessage: `Failed to add records to the link chart. ${l}`,
|
|
702
|
+
error: p
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
}, ct = T(Ne, {
|
|
706
|
+
name: $,
|
|
707
|
+
description: `Adds records (entities or relationships) to the current link chart visualization from an inquiry into the knowledge graph data. The inquiry will retrieve data from the graph database that will serve as the basis for the records to be added to the link chart. The user should have explicitly requested to add records to the current link chart from their prompt. "add to new link chart" is not a valid prompt for this tool.
|
|
708
|
+
|
|
709
|
+
example prompts:
|
|
710
|
+
- "add all suppliers and the parts they produce to the link chart"
|
|
711
|
+
- "show me the competitors of company x and add them to the link chart"
|
|
712
|
+
- "add the relationships between company x and company y to the link chart"
|
|
713
|
+
- "expand all the companies"
|
|
714
|
+
- "expand company x through all the buildings it owns"
|
|
715
|
+
- "connect company x and company y"
|
|
716
|
+
- "connect all buildings on the link chart"
|
|
717
|
+
`,
|
|
718
|
+
schema: Se
|
|
719
|
+
});
|
|
720
|
+
async function Re(e, t) {
|
|
721
|
+
return await t.map?.applyLayout(e), await E(t), { appliedLayout: e };
|
|
722
|
+
}
|
|
723
|
+
const Q = "applyLayout", qe = y.object({
|
|
724
|
+
layout: y.enum([
|
|
725
|
+
"organic-standard",
|
|
726
|
+
"organic-community",
|
|
727
|
+
"basic-grid",
|
|
728
|
+
"hierarchical-bottom-to-top",
|
|
729
|
+
"radial-root-centric",
|
|
730
|
+
"tree-left-to-right",
|
|
731
|
+
"geographic-organic-standard",
|
|
732
|
+
"chronological-mono-timeline",
|
|
733
|
+
"chronological-multi-timeline"
|
|
734
|
+
]).describe(
|
|
735
|
+
"The layout mode to apply to the link chart. The value must be one of the following: organic-standard, organic-community, basic-grid, hierarchical-bottom-to-top, radial-root-centric, tree-left-to-right, geographic-organic-standard, chronological-mono-timeline, chronological-multi-timeline"
|
|
736
|
+
)
|
|
737
|
+
}), Ge = async ({ layout: e }, t) => {
|
|
738
|
+
const { view: r } = R(t);
|
|
739
|
+
if (x(r)) {
|
|
740
|
+
const { appliedLayout: a } = await Re(e, r);
|
|
741
|
+
return {
|
|
742
|
+
toolName: Q,
|
|
743
|
+
status: "success",
|
|
744
|
+
summary: `Successfully applied layout: ${a}.`,
|
|
745
|
+
details: {
|
|
746
|
+
appliedLayout: a
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
} else
|
|
750
|
+
return {
|
|
751
|
+
toolName: Q,
|
|
752
|
+
status: "error",
|
|
753
|
+
errorMessage: "The applyLayout tool can only be used with a LinkChartView.",
|
|
754
|
+
error: new Error()
|
|
755
|
+
};
|
|
756
|
+
}, pt = T(Ge, {
|
|
757
|
+
name: Q,
|
|
758
|
+
description: "Apply a diagram layout to the link chart",
|
|
759
|
+
schema: qe
|
|
760
|
+
});
|
|
761
|
+
async function $e(e, t) {
|
|
762
|
+
return t.map?.changeNonspatialDataDisplay(e), await E(t), { appliedNonspatialDataDisplayMode: e };
|
|
763
|
+
}
|
|
764
|
+
const L = "changeNonspatialVisibility", Ae = y.object({
|
|
765
|
+
setting: y.enum(["hidden", "visible"]).describe("The setting of nonspatial visibility")
|
|
766
|
+
}), De = async ({ setting: e }, t) => {
|
|
767
|
+
const { view: r } = R(t);
|
|
768
|
+
if (x(r)) {
|
|
769
|
+
const { appliedNonspatialDataDisplayMode: a } = await $e(e, r);
|
|
770
|
+
return {
|
|
771
|
+
toolName: L,
|
|
772
|
+
status: "success",
|
|
773
|
+
summary: `Successfully applied nonspatial visibility setting: ${a}.`,
|
|
774
|
+
details: {
|
|
775
|
+
appliedNonspatialDataDisplayMode: a
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
} else
|
|
779
|
+
return {
|
|
780
|
+
toolName: L,
|
|
781
|
+
status: "error",
|
|
782
|
+
errorMessage: "The changeNonspatialVisibility tool can only be used with a LinkChartView.",
|
|
783
|
+
error: new Error()
|
|
784
|
+
};
|
|
785
|
+
}, lt = T(De, {
|
|
786
|
+
name: L,
|
|
787
|
+
description: "Change whether or not nonspatial data is visible in the link chart. The value must be either 'hidden' or 'visible'.",
|
|
788
|
+
schema: Ae
|
|
789
|
+
});
|
|
790
|
+
async function Ee(e, t, r, a, n) {
|
|
791
|
+
let s, c = "";
|
|
792
|
+
for (let o = 1; o <= P; o++) {
|
|
793
|
+
const { graphQuery: i, explanation: h } = await K(
|
|
794
|
+
e,
|
|
795
|
+
t.dataModel,
|
|
796
|
+
r,
|
|
797
|
+
n,
|
|
798
|
+
s
|
|
799
|
+
);
|
|
800
|
+
try {
|
|
801
|
+
await w({ text: `Attempting to create link chart from derived query: ${i}` }, n);
|
|
802
|
+
const p = await re.fromCypherQuery(
|
|
803
|
+
t,
|
|
804
|
+
new W({
|
|
805
|
+
openCypherQuery: i
|
|
806
|
+
})
|
|
807
|
+
);
|
|
808
|
+
await w({ text: "Link chart created successfully, loading..." }, n), await p.load();
|
|
809
|
+
const l = a.map;
|
|
810
|
+
return a.map = p, await a.when(), await ae.whenOnce(() => !a.updating), p.entityCount === 0 && p.relationshipCount === 0 ? (a.map === p && (a.map = l), p.destroy(), {
|
|
811
|
+
type: "error",
|
|
812
|
+
errorMessage: `Query returned no results. Cypher Query used to create the link chart:
|
|
813
|
+
${i}
|
|
814
|
+
|
|
815
|
+
Explanation: ${h}`
|
|
816
|
+
}) : (await E(a), {
|
|
817
|
+
type: "success",
|
|
818
|
+
graphQuery: i,
|
|
819
|
+
explanation: h
|
|
820
|
+
});
|
|
821
|
+
} catch (p) {
|
|
822
|
+
const l = C(p);
|
|
823
|
+
if (o >= P) {
|
|
824
|
+
c = l;
|
|
825
|
+
break;
|
|
826
|
+
}
|
|
827
|
+
s = {
|
|
828
|
+
failedGraphQuery: i,
|
|
829
|
+
executionError: l,
|
|
830
|
+
attemptCount: o
|
|
831
|
+
}, await w(
|
|
832
|
+
{ text: `Attempt ${o} to create link chart failed with error: ${l}. Retrying ...` },
|
|
833
|
+
n
|
|
834
|
+
);
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
return {
|
|
838
|
+
type: "error",
|
|
839
|
+
errorMessage: `Failed to create link chart after ${P} attempts. Last error: ${c}`
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
const A = "createLinkChart", Me = y.object({
|
|
843
|
+
prompt: y.string().describe(
|
|
844
|
+
"The user's inquiry and context required in order to generate a cypher query that will be used to create a link chart visualization. Only include information relevant to generating a cypher query. Do not suggest entity types, relationship types or properties. Do not include limits or formatting instructions for the query results unless specifically requested by the user. The prompt should be focused on the data the user wants to see in the link chart, not how to generate it."
|
|
845
|
+
)
|
|
846
|
+
}), Qe = async ({ prompt: e }, t) => {
|
|
847
|
+
const { knowledgeGraph: r } = await q(t), { view: a } = R(t);
|
|
848
|
+
if (x(a)) {
|
|
849
|
+
const s = k.getDefault().helperServices, c = await Ee(
|
|
850
|
+
`${e}
|
|
851
|
+
|
|
852
|
+
${X}`,
|
|
853
|
+
r,
|
|
854
|
+
`${s.aiAssistantServices.url}${s.aiAssistantServices.graphQueryAssistant}`,
|
|
855
|
+
a,
|
|
856
|
+
t
|
|
857
|
+
);
|
|
858
|
+
if (c.type === "error")
|
|
859
|
+
return {
|
|
860
|
+
toolName: A,
|
|
861
|
+
status: "error",
|
|
862
|
+
errorMessage: c.errorMessage,
|
|
863
|
+
error: new Error()
|
|
864
|
+
};
|
|
865
|
+
const { graphQuery: o, explanation: i } = c;
|
|
866
|
+
return {
|
|
867
|
+
toolName: A,
|
|
868
|
+
status: "success",
|
|
869
|
+
summary: `Link chart created successfully. Cypher Query used to create the link chart:
|
|
870
|
+
${o}
|
|
871
|
+
|
|
872
|
+
Explanation: ${i}`,
|
|
873
|
+
details: {
|
|
874
|
+
generatedQuery: o,
|
|
875
|
+
explanation: i
|
|
876
|
+
}
|
|
877
|
+
};
|
|
878
|
+
} else
|
|
879
|
+
return {
|
|
880
|
+
toolName: A,
|
|
881
|
+
status: "error",
|
|
882
|
+
errorMessage: "The createLinkChart tool can only be used with a LinkChartView.",
|
|
883
|
+
error: new Error()
|
|
884
|
+
};
|
|
885
|
+
}, ut = T(Qe, {
|
|
886
|
+
name: A,
|
|
887
|
+
description: "Creates a new link chart visualization from an inquiry into the knowledge graph data. The inquiry will retrieve data from the graph database that will serve as the basis for the new link chart. The user should have explicitly requested the creation of a new link chart from their prompt using language like 'create new link chart' or 'add to new link chart'.",
|
|
888
|
+
schema: Me
|
|
889
|
+
}), I = "queryGraphData", Le = y.object({
|
|
890
|
+
prompt: y.string().describe(
|
|
891
|
+
"The user's inquiry into the knowledge graph, from which a cypher query will be generated and executed to answer the inquiry. Only include entity types, relationship types or properties if they are provided in the user prompt or prior steps. Do not suggest entity types, relationship types or properties. Do not include limits, information on what to return, instructions on how to write the query, or formatting instructions for the query results unless specifically requested by the user."
|
|
892
|
+
)
|
|
893
|
+
}), Ie = async ({ prompt: e }, t) => {
|
|
894
|
+
const { knowledgeGraph: r } = await q(t), n = k.getDefault().helperServices;
|
|
895
|
+
let s = e, c = null, o = null;
|
|
896
|
+
try {
|
|
897
|
+
({ view: o } = R(t));
|
|
898
|
+
} catch {
|
|
899
|
+
}
|
|
900
|
+
o && ({ enhancedPrompt: s, bindParameters: c } = await Y({
|
|
901
|
+
prompt: e,
|
|
902
|
+
view: o,
|
|
903
|
+
knowledgeGraph: r,
|
|
904
|
+
includeReturnEntityAndRelationshipContext: !1
|
|
905
|
+
}));
|
|
906
|
+
const i = await V({
|
|
907
|
+
prompt: s,
|
|
908
|
+
bindParameters: c,
|
|
909
|
+
kg: r,
|
|
910
|
+
graphQueryServiceUrl: `${n.aiAssistantServices.url}${n.aiAssistantServices.graphQueryAssistant}`,
|
|
911
|
+
targetStructure: new Array(),
|
|
912
|
+
targetStructureReducer: (f, b) => (f.push(b), f),
|
|
913
|
+
requestOptions: {
|
|
914
|
+
signal: M(t),
|
|
915
|
+
timeout: t?.timeout
|
|
916
|
+
},
|
|
917
|
+
config: t
|
|
918
|
+
});
|
|
919
|
+
if (i.type !== "success") {
|
|
920
|
+
const f = i.type === "generation-error" ? i.errorMessage : `${i.errorMessage} Cypher query: ${i.graphQuery}`;
|
|
921
|
+
return {
|
|
922
|
+
toolName: I,
|
|
923
|
+
status: "error",
|
|
924
|
+
errorMessage: `Failed to query the knowledge graph. ${f}`,
|
|
925
|
+
error: "error" in i ? i.error : null
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
const { graphQuery: h, explanation: p, processedResult: l, resultHeader: u } = i, m = u.headerKeys;
|
|
929
|
+
for (const f of l)
|
|
930
|
+
for (const b of f)
|
|
931
|
+
v(
|
|
932
|
+
b,
|
|
933
|
+
(S) => J(S)
|
|
934
|
+
);
|
|
935
|
+
const d = 50, g = l.slice(0, d).map((f) => JSON.stringify(f));
|
|
936
|
+
return {
|
|
937
|
+
toolName: I,
|
|
938
|
+
status: "success",
|
|
939
|
+
summary: `To answer the inquiry, the following cypher query was executed against the knowledge graph:
|
|
940
|
+
|
|
941
|
+
\`\`\`cypher
|
|
942
|
+
${h}
|
|
943
|
+
\`\`\`
|
|
944
|
+
|
|
945
|
+
Query Results:
|
|
946
|
+
${g.length} result(s) found.
|
|
947
|
+
|
|
948
|
+
Column Headers: ${m.join(", ")}
|
|
949
|
+
|
|
950
|
+
${g.length > d ? `Showing top ${d} results:
|
|
951
|
+
|
|
952
|
+
` : `Results:
|
|
953
|
+
|
|
954
|
+
`}${g.join(`
|
|
955
|
+
`)}
|
|
956
|
+
`,
|
|
957
|
+
details: {
|
|
958
|
+
generatedQuery: h,
|
|
959
|
+
explanation: p,
|
|
960
|
+
resultHeader: {
|
|
961
|
+
headerKeys: m,
|
|
962
|
+
exceededTransferLimit: u.exceededTransferLimit,
|
|
963
|
+
outSpatialReference: u.outSpatialReference
|
|
964
|
+
},
|
|
965
|
+
queryResults: l
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
}, ht = T(Ie, {
|
|
969
|
+
name: I,
|
|
970
|
+
description: "Allows users to explore the data in their knowledge graph via cypher query. Generates and executes a cypher query based on the user's inquiry into the knowledge graph, and displays the results in the chat pane without modifying the user's link chart if any. Use this tool when the user is asking an exploratory question about their data as a whole that can be answered via cypher query, for example 'What are the top 5 suppliers by total parts cost?' or 'How many employees do we have in each department?'.",
|
|
971
|
+
schema: Le
|
|
972
|
+
}), F = "generateCypher", Fe = y.object({
|
|
973
|
+
prompt: y.string().describe("The user's inquiry into the knowledge graph that needs to be translated into a cypher query.")
|
|
974
|
+
}), je = async ({ prompt: e }, t) => {
|
|
975
|
+
const { knowledgeGraph: r } = await q(t), n = k.getDefault().helperServices;
|
|
976
|
+
try {
|
|
977
|
+
const { graphQuery: s, explanation: c } = await me(
|
|
978
|
+
e,
|
|
979
|
+
r.dataModel,
|
|
980
|
+
`${n.aiAssistantServices.url}${n.aiAssistantServices.graphQueryAssistant}`,
|
|
981
|
+
t
|
|
982
|
+
);
|
|
983
|
+
return {
|
|
984
|
+
toolName: F,
|
|
985
|
+
status: "success",
|
|
986
|
+
summary: `Generated Graph Query:
|
|
987
|
+
${s}
|
|
988
|
+
|
|
989
|
+
Explanation: ${c}`,
|
|
990
|
+
details: {
|
|
991
|
+
generatedQuery: s,
|
|
992
|
+
explanation: c
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
|
+
} catch (s) {
|
|
996
|
+
const c = C(s);
|
|
997
|
+
return {
|
|
998
|
+
toolName: F,
|
|
999
|
+
status: "error",
|
|
1000
|
+
errorMessage: `Failed to generate Cypher query. ${c}`,
|
|
1001
|
+
error: s
|
|
1002
|
+
};
|
|
1003
|
+
}
|
|
1004
|
+
}, dt = T(je, {
|
|
1005
|
+
name: F,
|
|
1006
|
+
description: "Generates an Open Cypher query based on the user's prompt which represents an inquiry into the data of the knowledge service and its graph database, attempting to filter based on certain conditions and traverse specified relationships. The generated query should be syntactically correct and optimized for performance.",
|
|
1007
|
+
schema: Fe
|
|
1008
|
+
}), _e = (e) => {
|
|
1009
|
+
const t = e.dataModel, r = /* @__PURE__ */ new Map();
|
|
1010
|
+
for (const o of t.searchIndexes)
|
|
1011
|
+
if (o.supportedCategory !== "esriTypeMetaEntityProvenance")
|
|
1012
|
+
for (const [i, h] of o.searchProperties.entries()) {
|
|
1013
|
+
const p = r.get(i) ?? /* @__PURE__ */ new Set();
|
|
1014
|
+
h.propertyNames.forEach((l) => p.add(l)), r.set(i, p);
|
|
1015
|
+
}
|
|
1016
|
+
const a = t.entityTypes.filter((o) => r.has(o.name)), n = t.relationshipTypes.filter((o) => r.has(o.name)), s = `Entity Types:
|
|
1017
|
+
${a.map(({ name: o }) => `${o}: [${Array.from(r.get(o) ?? []).join(", ")}]`).join(`
|
|
1018
|
+
`)}`, c = `Relationship Types:
|
|
1019
|
+
${n.map(({ name: o }) => `${o}: [${Array.from(r.get(o) ?? []).join(", ")}]`).join(`
|
|
1020
|
+
`)}`;
|
|
1021
|
+
return `${s}
|
|
1022
|
+
|
|
1023
|
+
${c}`;
|
|
1024
|
+
};
|
|
1025
|
+
async function Oe(e, t, r) {
|
|
1026
|
+
const a = await D("arcgis_knowledge_lucene_generation_prompt"), n = {
|
|
1027
|
+
inquiry: e,
|
|
1028
|
+
dataModelForSearch: _e(t)
|
|
1029
|
+
}, s = y.enum(["entity", "relationship", "both"]).describe("The graph element category to search against - entity, relationship, or both"), c = y.number().int().positive().nullable().describe(
|
|
1030
|
+
"The maximum number of search results to return. Default to 10 if not specified by the user, or set to null if the user specifically requests no limits or all results."
|
|
1031
|
+
), o = y.array(
|
|
1032
|
+
y.enum(
|
|
1033
|
+
t.dataModel.entityTypes.map((p) => p.name).concat(t.dataModel.relationshipTypes.map((p) => p.name))
|
|
1034
|
+
)
|
|
1035
|
+
).min(1), i = y.object({
|
|
1036
|
+
query: y.string().describe("A lucene syntax query string to be executed against the knowledge graph search API"),
|
|
1037
|
+
typeFilters: o.nullable().describe(
|
|
1038
|
+
"Nullable list of entity or relationship types from the graph to limit the search to. If set to null, search will execute against all named types with indexed properties in the graph"
|
|
1039
|
+
),
|
|
1040
|
+
typeCategoryFilter: s,
|
|
1041
|
+
resultLimit: c
|
|
1042
|
+
});
|
|
1043
|
+
return await ne({
|
|
1044
|
+
promptText: a,
|
|
1045
|
+
inputVariables: n,
|
|
1046
|
+
schema: i,
|
|
1047
|
+
config: r
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
const j = "searchGraphData", Ke = y.object({
|
|
1051
|
+
prompt: y.string().describe(
|
|
1052
|
+
"The user's inquiry into the knowledge graph, from which a lucene search query will be generated and executed against the graph to return relevant results."
|
|
1053
|
+
)
|
|
1054
|
+
}), Ue = async ({ prompt: e }, t) => {
|
|
1055
|
+
const { knowledgeGraph: r } = await q(t);
|
|
1056
|
+
await w({ text: "Generating search query for the user inquiry" }, t);
|
|
1057
|
+
const a = await Oe(e, r, t);
|
|
1058
|
+
await w({ text: "Executing graph search with generated search query" }, t);
|
|
1059
|
+
const n = await ke({
|
|
1060
|
+
kg: r,
|
|
1061
|
+
searchQuery: a.query,
|
|
1062
|
+
typeCategoryFilter: a.typeCategoryFilter,
|
|
1063
|
+
namedTypesFilter: a.typeFilters,
|
|
1064
|
+
searchResultLimit: a.resultLimit,
|
|
1065
|
+
requestOptions: {
|
|
1066
|
+
signal: M(t),
|
|
1067
|
+
timeout: t?.timeout
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
if (n.type !== "success")
|
|
1071
|
+
return {
|
|
1072
|
+
toolName: j,
|
|
1073
|
+
status: "error",
|
|
1074
|
+
errorMessage: n.errorMessage,
|
|
1075
|
+
error: "error" in n ? n.error : null
|
|
1076
|
+
};
|
|
1077
|
+
for (const o of n.results)
|
|
1078
|
+
v(
|
|
1079
|
+
o,
|
|
1080
|
+
(i) => J(i)
|
|
1081
|
+
);
|
|
1082
|
+
const s = 10, c = n.results.slice(0, s);
|
|
1083
|
+
return {
|
|
1084
|
+
toolName: j,
|
|
1085
|
+
status: "success",
|
|
1086
|
+
summary: `To answer the query, the following lucene query was generated and executed:
|
|
1087
|
+
Query: ${a.query}
|
|
1088
|
+
Type Category Filter: ${a.typeCategoryFilter}
|
|
1089
|
+
Named Type Filters: ${a.typeFilters ? a.typeFilters.join(", ") : "None"}
|
|
1090
|
+
Result Limit: ${a.resultLimit ?? "No limit"}
|
|
1091
|
+
|
|
1092
|
+
Search Results: ${n.results.length} result(s) found.
|
|
1093
|
+
|
|
1094
|
+
${n.results.length > s ? `Showing top ${s} results:
|
|
1095
|
+
|
|
1096
|
+
` : ""}${c.map((o) => JSON.stringify(o)).join(`
|
|
1097
|
+
`)}`,
|
|
1098
|
+
details: {
|
|
1099
|
+
generatedSearchQuery: a,
|
|
1100
|
+
searchResults: n.results
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
}, yt = T(Ue, {
|
|
1104
|
+
name: j,
|
|
1105
|
+
description: `
|
|
1106
|
+
Search the knowledge graph using one or more search texts, using lucene search syntax, against indexed string properties defined on their entities and relationships. Use this tool when the user asks a question about their knowledge graph data as a whole, that could be answered via lucene text search of properties stored on graph elements, e.g requiring fuzzy matching. Otherwise if the inquiry is looking for connected records (e.g. paths), data aggregations, etc explore the data via the queryGraphData tool.
|
|
1107
|
+
Example prompts:
|
|
1108
|
+
- "Find 'Bradley'"
|
|
1109
|
+
- "find the person john smith"
|
|
1110
|
+
- "find all people named smith"
|
|
1111
|
+
- "Find all references to 'delayed parts shipment'"
|
|
1112
|
+
- "Find all reports authored by someone with the title of 'Researcher'"
|
|
1113
|
+
- "Find the first 5 reports where summary mentions flood zoning near Sacramento, and the organization name is the City of Sacramento Utilities, and tags containing stormwater".
|
|
1114
|
+
- "Search for all john smiths and show their global ids`,
|
|
1115
|
+
schema: Ke
|
|
1116
|
+
});
|
|
1117
|
+
export {
|
|
1118
|
+
O as G,
|
|
1119
|
+
pt as a,
|
|
1120
|
+
ut as b,
|
|
1121
|
+
lt as c,
|
|
1122
|
+
ct as d,
|
|
1123
|
+
it as e,
|
|
1124
|
+
q as f,
|
|
1125
|
+
dt as g,
|
|
1126
|
+
st as h,
|
|
1127
|
+
ht as q,
|
|
1128
|
+
yt as s
|
|
1129
|
+
};
|