@arcgis/ai-components 5.1.0-next.99 → 5.2.0-next.1
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/README.md +2 -2
- package/dist/agent-utils/BaseAgent.d.ts +90 -0
- package/dist/agent-utils/BaseAgent.js +87 -0
- package/dist/agent-utils/FunctionAgent.d.ts +64 -0
- package/dist/agent-utils/FunctionAgent.js +98 -0
- package/dist/agent-utils/LLMAgent.d.ts +65 -0
- package/dist/agent-utils/LLMAgent.js +139 -0
- package/dist/agent-utils/WorkflowAgent.d.ts +44 -0
- package/dist/agent-utils/WorkflowAgent.js +70 -0
- package/dist/agent-utils/middlewares/humanInTheLoop.d.ts +152 -0
- package/dist/agent-utils/middlewares/humanInTheLoop.js +94 -0
- package/dist/agent-utils/middlewares/middleware.d.ts +25 -0
- package/dist/agent-utils/middlewares/middleware.js +44 -0
- package/dist/agent-utils/middlewares/trace.d.ts +25 -0
- package/dist/agent-utils/middlewares/trace.js +50 -0
- package/dist/agent-utils/middlewares/types.d.ts +123 -0
- package/dist/agent-utils/middlewares/types.js +2 -0
- package/dist/agent-utils/tools/FunctionTool.d.ts +127 -0
- package/dist/agent-utils/tools/FunctionTool.js +80 -0
- package/dist/agent-utils/types.d.ts +152 -0
- package/dist/agent-utils/workflows/BaseWorkflow.d.ts +87 -0
- package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +72 -0
- package/dist/agent-utils/workflows/ConditionalWorkflow.js +61 -0
- package/dist/agent-utils/workflows/LoopWorkflow.d.ts +58 -0
- package/dist/agent-utils/workflows/LoopWorkflow.js +56 -0
- package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +68 -0
- package/dist/agent-utils/workflows/ParallelWorkflow.js +129 -0
- package/dist/agent-utils/workflows/RouterWorkflow.d.ts +63 -0
- package/dist/agent-utils/workflows/RouterWorkflow.js +75 -0
- package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +56 -0
- package/dist/agent-utils/workflows/SequentialWorkflow.js +69 -0
- package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +74 -0
- package/dist/agent-utils/workflows/SwitchWorkflow.js +84 -0
- package/dist/assets/embeddings.worker-k9_Ou679.js +1 -0
- package/dist/cdn/{24MYCR6F.js → 23EQTPO3.js} +2 -2
- package/dist/cdn/{Z3DVGFEE.js → 2AXF774U.js} +2 -2
- package/dist/cdn/{UK6CP7BR.js → 3PKJWIC3.js} +2 -2
- package/dist/cdn/462JBSEV.js +422 -0
- package/dist/cdn/4HU7735A.js +42 -0
- package/dist/cdn/5QAHYX7Y.js +5 -0
- package/dist/cdn/{YVTKUITE.js → 5ZZGKP7N.js} +2 -2
- package/dist/cdn/{DMLSCJAM.js → 6YMR4QSD.js} +2 -2
- package/dist/cdn/{LXFCO34K.js → 7BCR6TUO.js} +2 -2
- package/dist/cdn/{EUNEQNYC.js → 7GH7VSB2.js} +1 -1
- package/dist/cdn/{YNJYG2RG.js → 7PLV4QH6.js} +2 -2
- package/dist/cdn/{JDL3HFFX.js → 7RCQFLPP.js} +2 -2
- package/dist/cdn/AMP6IALT.js +2 -0
- package/dist/cdn/{Y3AUHNRX.js → AO7BQHKC.js} +2 -2
- package/dist/cdn/{K6LVZHWM.js → AXDZBBNL.js} +2 -2
- package/dist/cdn/{WBRZZ4FB.js → DDLZOMUY.js} +2 -2
- package/dist/cdn/DHOVCT6R.js +2 -0
- package/dist/cdn/{ESTSYVJP.js → F2AHA4GB.js} +2 -2
- package/dist/cdn/FHVXO2WG.js +166 -0
- package/dist/cdn/{VHOF6SUZ.js → FL4W4VYN.js} +3 -3
- package/dist/cdn/FX5JFRDL.js +2 -0
- package/dist/cdn/{CFT5BBC6.js → FX7UOGHP.js} +2 -2
- package/dist/cdn/GSEPHN3A.js +106 -0
- package/dist/cdn/H7422XUG.js +2 -0
- package/dist/cdn/HB5A5R2E.js +2 -0
- package/dist/cdn/JY6LLOUJ.js +22 -0
- package/dist/cdn/{LSGRWCAO.js → KMQ3SP4I.js} +2 -2
- package/dist/cdn/{MZJGADGH.js → LQ6R5YRN.js} +2 -2
- package/dist/cdn/MDVYQQUG.js +14 -0
- package/dist/cdn/{3QC3BRZP.js → MH5RPXHM.js} +2 -2
- package/dist/cdn/{54ATSQPS.js → NAUXSHIE.js} +18 -18
- package/dist/cdn/{SFREIREB.js → NE7E52YR.js} +2 -2
- package/dist/cdn/{2YEKZADB.js → NVI3I46B.js} +2 -2
- package/dist/cdn/{YGW7TUNX.js → OAVEHGB6.js} +1 -1
- package/dist/cdn/{DSEMD4M2.js → OH64RMOR.js} +3 -3
- package/dist/cdn/ON2V5XI2.js +3 -0
- package/dist/cdn/{PTGKT5P6.js → P6OPJQMC.js} +2 -2
- package/dist/cdn/{TRDKA5Y6.js → QR54T33D.js} +2 -2
- package/dist/cdn/{457RLS3H.js → RVOAPUBN.js} +2 -2
- package/dist/cdn/S6W6HV4T.js +36 -0
- package/dist/cdn/{5JBT3YNY.js → SXDLXCIM.js} +2 -2
- package/dist/cdn/{G4SVCCJH.js → USMDJUFS.js} +2 -2
- package/dist/cdn/{Q5D5LJS5.js → V2P4AIGG.js} +2 -2
- package/dist/cdn/V5YEZSRY.js +16 -0
- package/dist/cdn/{5PT7ZFXF.js → X2ZDYHCG.js} +20 -7
- package/dist/cdn/Y333DGV6.js +2 -0
- package/dist/cdn/{CFDTXKJ6.js → YIMNOUTF.js} +1 -1
- package/dist/cdn/YY2SBO3V.js +2 -0
- package/dist/cdn/{7EXACS27.js → ZLXN7NMF.js} +3 -2
- package/dist/cdn/ZS2TZ6BF.js +31 -0
- package/dist/cdn/{W5CHGOOR.js → ZTBA5PM7.js} +2 -2
- 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.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-message-feedback/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-message-feedback/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-message-footer/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-message-read-aloud/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/assistant-suggested-prompts/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/BaseWorkflow.js +107 -0
- package/dist/chunks/adapter.js +2974 -0
- package/dist/chunks/arcgisKnowledgeGraph.js +174 -0
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +8 -0
- package/dist/chunks/arcgis_knowledge_current_map_context.js +8 -0
- package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +101 -0
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +48 -0
- package/dist/chunks/arcgis_knowledge_tool_prompt.js +34 -0
- package/dist/chunks/converterUtils.js +1 -1
- package/dist/chunks/dataExplorationGraph.js +298 -0
- package/dist/chunks/data_explore_filter_prompt.js +125 -0
- package/dist/chunks/data_explore_query_prompt.js +144 -0
- package/dist/chunks/embeddings.worker.js +25 -0
- package/dist/chunks/field_descriptions_prompt.js +112 -0
- package/dist/chunks/generateLayerDescriptions.js +413 -0
- package/dist/chunks/graph.js +86 -0
- package/dist/chunks/helpGraph.js +123 -0
- package/dist/chunks/help_prompt.js +57 -0
- package/dist/chunks/intent_prompt.js +123 -0
- package/dist/chunks/layerStylingGraph.js +189 -0
- package/dist/chunks/layer_descriptions_prompt.js +59 -0
- package/dist/chunks/layer_styling_prompt.js +72 -0
- package/dist/chunks/navigationGraph.js +266 -0
- package/dist/chunks/navigation_intent_prompt.js +46 -0
- package/dist/chunks/navigation_tool_prompt.js +39 -0
- package/dist/chunks/orchestrator.js +528 -0
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +71 -0
- package/dist/chunks/summarize_query_response_prompt.js +78 -0
- package/dist/chunks/toolCallResponse.js +29 -0
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +47 -29
- package/dist/chunks/utils2.js +42 -7
- package/dist/chunks/utils3.js +16 -0
- package/dist/components/arcgis-assistant/customElement.d.ts +60 -8
- package/dist/components/arcgis-assistant/customElement.js +32 -24
- package/dist/components/arcgis-assistant/types.d.ts +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +2 -2
- 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 +25 -9
- package/dist/components/arcgis-assistant-help-agent/customElement.js +28 -9
- package/dist/components/arcgis-assistant-interrupt/customElement.js +8 -12
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +158 -0
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +68 -0
- package/dist/components/arcgis-assistant-knowledge-agent/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-knowledge-agent/index.js +1 -0
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +28 -9
- package/dist/components/arcgis-assistant-message/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +24 -28
- package/dist/components/arcgis-assistant-message-text/customElement.js +1 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +26 -8
- package/dist/components/arcgis-assistant-speech-input/customElement.js +1 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
- package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/loader.js +2 -1
- package/dist/types/lumina.d.ts +6 -1
- package/dist/types/preact.d.ts +7 -1
- package/dist/types/react.d.ts +8 -1
- package/dist/types/stencil.d.ts +6 -1
- package/dist/utils/index.d.ts +203 -9
- package/dist/utils/index.js +109 -11
- package/package.json +26 -11
- package/dist/cdn/4QVKWA2Z.js +0 -24
- package/dist/cdn/5L7OZ37N.js +0 -2
- package/dist/cdn/6ALN3KMA.js +0 -269
- package/dist/cdn/ARCP5UZY.js +0 -2
- package/dist/cdn/B4DEC7PH.js +0 -2
- package/dist/cdn/D7WNBUVK.js +0 -106
- package/dist/cdn/GER6EQYH.js +0 -2
- package/dist/cdn/KVH3PDVW.js +0 -2
- package/dist/cdn/O62HTIOD.js +0 -2
- package/dist/cdn/R5FWFRWW.js +0 -2
- package/dist/cdn/SZBOIYZZ.js +0 -2
- package/dist/cdn/WNDUCHXU.js +0 -2
- package/dist/cdn/YW52XJMM.js +0 -396
- package/dist/cdn/ZLO73NU6.js +0 -2
- package/dist/cdn/ZPNJGIAF.js +0 -2
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { StateGraph as d, START as g, END as i } from "@langchain/langgraph/web";
|
|
3
|
+
import { l as h, g as x, f as p, r as f, t as y, H as u } from "./adapter.js";
|
|
4
|
+
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
|
+
import "@arcgis/core/portal/Portal.js";
|
|
6
|
+
import { j as S, s as c } from "./generateLayerDescriptions.js";
|
|
7
|
+
import "@langchain/core/messages";
|
|
8
|
+
import "@langchain/core/callbacks/dispatch/web";
|
|
9
|
+
import "@langchain/openai";
|
|
10
|
+
import "@arcgis/core/core/reactiveUtils.js";
|
|
11
|
+
import "@arcgis/core/layers/FeatureLayer.js";
|
|
12
|
+
import "@arcgis/core/request.js";
|
|
13
|
+
import { ToolNode as E } from "@langchain/langgraph/prebuilt";
|
|
14
|
+
import "@langchain/core/prompts";
|
|
15
|
+
const m = [h], v = (e) => {
|
|
16
|
+
if (!e || e.size === 0)
|
|
17
|
+
return "No layers available in this map.";
|
|
18
|
+
const t = Array.from(e.values()).map(({ layerItem: r, fieldRegistry: s }, l) => {
|
|
19
|
+
const a = Array.from(s.values()).map((n) => n.name).slice(0, 10).join(", "), o = s.size > 10 ? ` (and ${s.size - 10} more)` : "";
|
|
20
|
+
return `${l + 1}. "${r.title}". Description: ${r.description}
|
|
21
|
+
Fields: ${a}${o}`;
|
|
22
|
+
}).join(`
|
|
23
|
+
|
|
24
|
+
`);
|
|
25
|
+
return `This map contains ${e.size} layer(s):
|
|
26
|
+
|
|
27
|
+
${t}`;
|
|
28
|
+
}, T = (e) => {
|
|
29
|
+
const t = e?.list() ?? [];
|
|
30
|
+
return t.length ? t.map((r) => `- ${r.agent.name}: ${r.agent.description}`).join(`
|
|
31
|
+
`) : "No agents currently available.";
|
|
32
|
+
};
|
|
33
|
+
async function _(e, t) {
|
|
34
|
+
const r = await x("help_prompt"), s = p(t, "layersAndFieldsRegistry"), l = p(t, "agentRegistry");
|
|
35
|
+
try {
|
|
36
|
+
const a = await S({
|
|
37
|
+
promptText: r,
|
|
38
|
+
modelTier: "fast",
|
|
39
|
+
tools: m,
|
|
40
|
+
inputVariables: {
|
|
41
|
+
layerSummary: v(s),
|
|
42
|
+
agents: T(l),
|
|
43
|
+
assignedTask: e.agentExecutionContext.assignedTask,
|
|
44
|
+
userRequest: e.agentExecutionContext.userRequest,
|
|
45
|
+
priorSteps: e.agentExecutionContext.priorSteps
|
|
46
|
+
}
|
|
47
|
+
}), o = (a.tool_calls?.length ?? 0) > 0, n = typeof a.text == "string" ? a.text.trim() : "";
|
|
48
|
+
return {
|
|
49
|
+
...e,
|
|
50
|
+
helpInternalState: {
|
|
51
|
+
...e.helpInternalState,
|
|
52
|
+
toolCallMessage: o ? a : void 0
|
|
53
|
+
},
|
|
54
|
+
outputMessage: o ? e.outputMessage : n,
|
|
55
|
+
summary: o ? "Prepared help tool call from assigned task." : "Provided map-related help based on the assigned task.",
|
|
56
|
+
status: o ? e.status : "success"
|
|
57
|
+
};
|
|
58
|
+
} catch (a) {
|
|
59
|
+
const o = a instanceof Error ? a.message : String(a);
|
|
60
|
+
return {
|
|
61
|
+
...e,
|
|
62
|
+
outputMessage: `Error invoking help agent: ${o}`,
|
|
63
|
+
summary: "Help agent execution failed.",
|
|
64
|
+
status: "failed"
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const C = (e, t) => f(["agentRegistry"], "Help Agent")(e, t);
|
|
69
|
+
async function H(e, t) {
|
|
70
|
+
const r = new E(m);
|
|
71
|
+
try {
|
|
72
|
+
const s = e.helpInternalState.toolCallMessage;
|
|
73
|
+
if (!s)
|
|
74
|
+
throw new Error("helpToolCalling: missing helpInternalState.toolCallMessage");
|
|
75
|
+
const a = (await r.invoke({ messages: [s] }, t)).messages.map((o) => o.text).join(`
|
|
76
|
+
`);
|
|
77
|
+
return await c({ text: `Finished executing help tool: ${a}` }, t), {
|
|
78
|
+
...e,
|
|
79
|
+
outputMessage: a,
|
|
80
|
+
status: "success",
|
|
81
|
+
summary: a ? y(a) : "Help executed.",
|
|
82
|
+
helpInternalState: {
|
|
83
|
+
...e.helpInternalState,
|
|
84
|
+
toolCallMessage: void 0
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
} catch (s) {
|
|
88
|
+
const l = s instanceof Error ? s.message : String(s);
|
|
89
|
+
return await c({ text: `Help tool execution failed: ${l}` }, t), {
|
|
90
|
+
...e,
|
|
91
|
+
outputMessage: `Help tool execution failed: ${l}`,
|
|
92
|
+
status: "failed",
|
|
93
|
+
summary: `Help tool execution failed: ${l}`,
|
|
94
|
+
helpInternalState: {
|
|
95
|
+
...e.helpInternalState,
|
|
96
|
+
toolCallMessage: void 0
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const b = () => new d(u).addNode("requireHelpServices", C).addNode("agent", _).addNode("tools", H).addEdge(g, "requireHelpServices").addEdge("requireHelpServices", "agent").addConditionalEdges("agent", (t) => t.helpInternalState.toolCallMessage ? "tools" : i).addEdge("tools", i), M = String.raw`- **help** — Enables users to ask questions about the map, layers, fields, and it's capabilities.
|
|
102
|
+
|
|
103
|
+
_Example: “Tell me about this map”_
|
|
104
|
+
_Example: “List all layers in this map”_
|
|
105
|
+
_Example: “List fields in protected areas layer”_
|
|
106
|
+
_Example: “What agents are available to me?”_
|
|
107
|
+
_Example: “What can you do?”_
|
|
108
|
+
_Example: “What can I ask”_
|
|
109
|
+
|
|
110
|
+
Even if the user asks unrelated queries like "What are the vowels in English alphabet" or "How to cook", call this agent.
|
|
111
|
+
|
|
112
|
+
IF the user asks map related queries, but those that are not performed by any of the agents, call this agent so we can respond accordingly.
|
|
113
|
+
_Example: "Create a chart"_
|
|
114
|
+
_Example: "Create a table"_`, D = {
|
|
115
|
+
id: "help",
|
|
116
|
+
name: "Help Agent",
|
|
117
|
+
description: M,
|
|
118
|
+
createGraph: b,
|
|
119
|
+
workspace: u
|
|
120
|
+
};
|
|
121
|
+
export {
|
|
122
|
+
D as H
|
|
123
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e = `## Map Query Gate
|
|
3
|
+
|
|
4
|
+
### Input
|
|
5
|
+
|
|
6
|
+
Assigned task:
|
|
7
|
+
{assignedTask}
|
|
8
|
+
|
|
9
|
+
Latest user request:
|
|
10
|
+
{userRequest}
|
|
11
|
+
|
|
12
|
+
Prior steps:
|
|
13
|
+
{priorSteps}
|
|
14
|
+
|
|
15
|
+
Use the assigned task as the primary instruction for the current query. The question will **not** be restated again here.
|
|
16
|
+
Use the latest user request as supporting context when needed.
|
|
17
|
+
Use prior steps only when needed to explain a previous result, failure, or likely next action.
|
|
18
|
+
|
|
19
|
+
### Map Context
|
|
20
|
+
|
|
21
|
+
{layerSummary}
|
|
22
|
+
|
|
23
|
+
## Available agents (capabilities)
|
|
24
|
+
|
|
25
|
+
{agents}
|
|
26
|
+
|
|
27
|
+
### Rules
|
|
28
|
+
|
|
29
|
+
- "What layers are in this map?" → List the layer names
|
|
30
|
+
- "What fields are in this layer?" → Call the tool to list the field names for that layer
|
|
31
|
+
- "What can you do?" / "What can I ask?" → Suggest specific queries using EXACT layer and field names from the context above
|
|
32
|
+
- "Tell me about this map" → Summarize layers and capabilities
|
|
33
|
+
- "Create a chart of all wells ans their depth" → If a question is map related but not supported by available capabilities, say so. Add that support for this might be added in the future.
|
|
34
|
+
- Questions completely unrelated to maps/GIS → Politely explain you only help with the map |
|
|
35
|
+
|
|
36
|
+
### Response Guidelines
|
|
37
|
+
|
|
38
|
+
When suggesting what users can ask, be SPECIFIC using actual layer names:
|
|
39
|
+
|
|
40
|
+
- "Show me water sources with elevation above 500"
|
|
41
|
+
- "Filter Protected Areas in Panama by protection level"
|
|
42
|
+
- "Zoom to Watershed Boundaries"
|
|
43
|
+
|
|
44
|
+
For "what can I ask" responses, provide 3-5 specific example queries using fields from the context.
|
|
45
|
+
|
|
46
|
+
For off-topic questions:
|
|
47
|
+
"I can only help with this map. Try asking me to filter [LayerName] by [FieldName], or zoom to a location."
|
|
48
|
+
|
|
49
|
+
Rules:
|
|
50
|
+
|
|
51
|
+
- Keep responses concise
|
|
52
|
+
- Use bullet points for lists
|
|
53
|
+
- Use new lines (\\n) and appropriate formatting in your response
|
|
54
|
+
`;
|
|
55
|
+
export {
|
|
56
|
+
e as default
|
|
57
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e = `## GIS Agent Orchestrator
|
|
3
|
+
|
|
4
|
+
You are an orchestrator for an ArcGIS Maps SDK for JavaScript system.
|
|
5
|
+
|
|
6
|
+
Your job is to decide the single best next agent to execute for the current step.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
|
|
12
|
+
You are given:
|
|
13
|
+
|
|
14
|
+
- the latest user request
|
|
15
|
+
- relevant chat history
|
|
16
|
+
- the list of registered agents
|
|
17
|
+
- optional prior steps from earlier agent executions
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Output
|
|
22
|
+
|
|
23
|
+
Return either:
|
|
24
|
+
|
|
25
|
+
- one decision with:
|
|
26
|
+
1. \`agentId\` — the next agent to execute
|
|
27
|
+
2. \`assignedTask\` — a clear, actionable task for that agent
|
|
28
|
+
3. \`requiresFollowUp\` — whether another orchestration step will likely be needed after this agent succeeds
|
|
29
|
+
|
|
30
|
+
- or \`null\` if no registered agent applies
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Important
|
|
35
|
+
|
|
36
|
+
- Return \`null\` only when the request is clearly outside the scope of all registered agents.
|
|
37
|
+
- If any agent can take the next useful step, select the best one instead of returning \`null\`.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Context
|
|
42
|
+
|
|
43
|
+
### Latest user request
|
|
44
|
+
|
|
45
|
+
{userRequest}
|
|
46
|
+
|
|
47
|
+
### Registered agents
|
|
48
|
+
|
|
49
|
+
Format:
|
|
50
|
+
{{id: string, name: string, description: string}}[]
|
|
51
|
+
|
|
52
|
+
{registeredAgents}
|
|
53
|
+
|
|
54
|
+
### Prior steps
|
|
55
|
+
|
|
56
|
+
Each step has:
|
|
57
|
+
|
|
58
|
+
- \`agentId: string\`
|
|
59
|
+
- \`assignedTask: string\`
|
|
60
|
+
- \`summary: string\`
|
|
61
|
+
- \`status: "success" | "failed" | "unknown"\`
|
|
62
|
+
|
|
63
|
+
Use prior steps to:
|
|
64
|
+
|
|
65
|
+
- Avoid repeating work that has already succeeded
|
|
66
|
+
- Retry or adjust steps that failed when appropriate
|
|
67
|
+
|
|
68
|
+
{priorSteps}
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Rules
|
|
73
|
+
|
|
74
|
+
- Focus primarily on the latest user request.
|
|
75
|
+
- Use relevant chat history only when the latest request clearly depends on earlier context; otherwise ignore it.
|
|
76
|
+
- Use prior steps to determine what has already been attempted or completed.
|
|
77
|
+
- Do not plan the full workflow up front. Only decide the next best step.
|
|
78
|
+
- Prefer an agent that can directly complete the user’s request.
|
|
79
|
+
- Only break the request into multiple steps when necessary.
|
|
80
|
+
- When multiple agents could help, choose the best fit instead of returning \`null\`.
|
|
81
|
+
- Base the choice on the registered agent descriptions, not on whether the user used exact matching keywords.
|
|
82
|
+
- If no agent can fully complete the request, but one agent can take the next useful step, choose that agent.
|
|
83
|
+
- Do NOT reuse constraints from prior steps unless the current user request explicitly requires them.
|
|
84
|
+
- Each step must reflect the current user request exactly.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Constraint Interpretation
|
|
89
|
+
|
|
90
|
+
Interpret the user’s wording precisely:
|
|
91
|
+
|
|
92
|
+
- Do not substitute one type of constraint for another (e.g., distance vs containment, range vs exact match, etc.)
|
|
93
|
+
- If the user specifies a constraint, use it exactly
|
|
94
|
+
- If the user does not specify a constraint, do not assume or infer one
|
|
95
|
+
|
|
96
|
+
Do not reinterpret the request into a different form.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Assigned Task Guidelines (IMPORTANT)
|
|
101
|
+
|
|
102
|
+
- The \`assignedTask\` must match the user’s request exactly in meaning
|
|
103
|
+
- Do not add, remove, or transform constraints
|
|
104
|
+
- Do not substitute one type of constraint for another
|
|
105
|
+
- If a constraint is not explicitly stated, do not assume one
|
|
106
|
+
|
|
107
|
+
- Keep the task short, specific, and directly executable
|
|
108
|
+
- Keep wording close to the user’s request with minimal transformation
|
|
109
|
+
- Use only information explicitly present in the user request or provided context
|
|
110
|
+
|
|
111
|
+
- The \`assignedTask\` may represent only part of the user’s request when multiple steps are necessary
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## requiresFollowUp Guidelines
|
|
116
|
+
|
|
117
|
+
- \`requiresFollowUp\` should indicate a likely next agent step, not uncertainty about the current request
|
|
118
|
+
- Set \`requiresFollowUp\` to \`true\` only when another orchestration step will likely be needed after this agent succeeds
|
|
119
|
+
- Set \`requiresFollowUp\` to \`false\` when a successful result from this agent would likely complete the user-visible task
|
|
120
|
+
`;
|
|
121
|
+
export {
|
|
122
|
+
e as default
|
|
123
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { NodeInterrupt as L, StateGraph as w, START as E, END as m } from "@langchain/langgraph/web";
|
|
3
|
+
import "@arcgis/core/identity/IdentityManager.js";
|
|
4
|
+
import "@arcgis/core/portal/Portal.js";
|
|
5
|
+
import { s as i, j as I } from "./generateLayerDescriptions.js";
|
|
6
|
+
import "@langchain/core/messages";
|
|
7
|
+
import "@langchain/openai";
|
|
8
|
+
import "@arcgis/core/core/reactiveUtils.js";
|
|
9
|
+
import "@arcgis/core/layers/FeatureLayer.js";
|
|
10
|
+
import "@arcgis/core/request.js";
|
|
11
|
+
import "@langchain/core/prompts";
|
|
12
|
+
import { f as p, z as v, A as R, B as T, C as F, D as C, E as A, F as $, I as N, J as b, K as q, L as M, g as _, r as j, M as S } from "./adapter.js";
|
|
13
|
+
import { h as k } from "./toolCallResponse.js";
|
|
14
|
+
import { ToolNode as V } from "@langchain/langgraph/prebuilt";
|
|
15
|
+
const h = 0.7, z = 10, D = async (t, e) => {
|
|
16
|
+
try {
|
|
17
|
+
await i({ text: "Similarity search to find fields" }, e);
|
|
18
|
+
const r = p(e, "fieldSearch"), a = p(e, "layersAndFieldsRegistry"), o = p(e, "embeddingCache"), n = await r.searchFields({
|
|
19
|
+
text: t.agentExecutionContext.assignedTask,
|
|
20
|
+
layerIds: t.vectorSearchLayerIds,
|
|
21
|
+
minScore: h,
|
|
22
|
+
topResults: z,
|
|
23
|
+
embeddingCache: o
|
|
24
|
+
}), c = n.map(({ layerId: d, results: g }) => {
|
|
25
|
+
const y = g.map((s) => ` - ${s.name} (${s.score.toFixed(2)})`).join(`
|
|
26
|
+
`);
|
|
27
|
+
return `${a.get(d)?.layerItem.name ?? d}:
|
|
28
|
+
${y}`;
|
|
29
|
+
}).join(`
|
|
30
|
+
`);
|
|
31
|
+
let l;
|
|
32
|
+
return n.length > 0 ? l = `Vector search completed. Matching layers and fields with scores:
|
|
33
|
+
${c}` : l = `No vector search results found for score over ${h}.`, await i({ text: l }, e), {
|
|
34
|
+
...t,
|
|
35
|
+
vectorSearchFieldResults: n
|
|
36
|
+
};
|
|
37
|
+
} catch (r) {
|
|
38
|
+
throw await i(
|
|
39
|
+
{ text: `Error during vector search: ${r instanceof Error ? r.message : String(r)}` },
|
|
40
|
+
e
|
|
41
|
+
), new Error(`Vector search failed: ${r instanceof Error ? r.message : String(r)}`);
|
|
42
|
+
}
|
|
43
|
+
}, P = 0.7, H = async (t, e) => {
|
|
44
|
+
try {
|
|
45
|
+
await i(
|
|
46
|
+
{ text: `Similarity search to find layers: ${t.agentExecutionContext.assignedTask}` },
|
|
47
|
+
e
|
|
48
|
+
);
|
|
49
|
+
const r = p(e, "layerSearch"), a = p(e, "layersAndFieldsRegistry"), o = await r.searchLayers({
|
|
50
|
+
text: t.agentExecutionContext.assignedTask,
|
|
51
|
+
minScore: P
|
|
52
|
+
}), n = o.map((d) => d.id), c = o.map(({ id: d, score: g }) => `${a.get(d)?.layerItem.name ?? d} (${g.toFixed(2)})`).join(`
|
|
53
|
+
`);
|
|
54
|
+
let l;
|
|
55
|
+
return n.length > 0 ? l = `Vector search completed. Matching layers with scores:
|
|
56
|
+
${c}` : l = "Vector search completed. No matching layers found.", await i({ text: l }, e), {
|
|
57
|
+
...t,
|
|
58
|
+
vectorSearchLayerIds: n
|
|
59
|
+
};
|
|
60
|
+
} catch (r) {
|
|
61
|
+
throw await i(
|
|
62
|
+
{ text: `Error during vector search: ${r instanceof Error ? r.message : String(r)}` },
|
|
63
|
+
e
|
|
64
|
+
), new Error(`Vector search failed: ${r instanceof Error ? r.message : String(r)}`);
|
|
65
|
+
}
|
|
66
|
+
}, f = [
|
|
67
|
+
v,
|
|
68
|
+
R,
|
|
69
|
+
T,
|
|
70
|
+
F,
|
|
71
|
+
C,
|
|
72
|
+
A,
|
|
73
|
+
$,
|
|
74
|
+
N,
|
|
75
|
+
b,
|
|
76
|
+
q,
|
|
77
|
+
M
|
|
78
|
+
], x = (t, e = 3) => {
|
|
79
|
+
const r = t.map((o, n) => o.type === "human" ? n : -1).filter((o) => o !== -1);
|
|
80
|
+
if (r.length === 0)
|
|
81
|
+
return [];
|
|
82
|
+
const a = r.length > e ? r[r.length - e] : r[0];
|
|
83
|
+
return t.slice(a);
|
|
84
|
+
}, G = async (t, e) => {
|
|
85
|
+
await i({ text: "Requesting LLM for layer query results" }, e);
|
|
86
|
+
const r = await _("navigation_intent_prompt");
|
|
87
|
+
if (!e?.configurable)
|
|
88
|
+
throw new Error("config.configurable is required for layer query tools");
|
|
89
|
+
const a = {
|
|
90
|
+
layerFieldInfo: t.layerFieldInfo
|
|
91
|
+
}, o = await I({
|
|
92
|
+
promptText: r,
|
|
93
|
+
modelTier: "advanced",
|
|
94
|
+
messages: x(t.agentExecutionContext.messages),
|
|
95
|
+
inputVariables: a,
|
|
96
|
+
tools: f
|
|
97
|
+
});
|
|
98
|
+
return await k(o, e), {
|
|
99
|
+
...t,
|
|
100
|
+
agentExecutionContext: {
|
|
101
|
+
...t.agentExecutionContext,
|
|
102
|
+
messages: [...t.agentExecutionContext.messages, o]
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
async function B(t, e) {
|
|
107
|
+
const a = await new V(f).invoke(
|
|
108
|
+
{
|
|
109
|
+
messages: x(t.agentExecutionContext.messages)
|
|
110
|
+
},
|
|
111
|
+
e
|
|
112
|
+
), o = a.messages.map((c) => c.text).join(`
|
|
113
|
+
`);
|
|
114
|
+
await i({ text: `Finished executing layer filter tool: ${o}` }, e);
|
|
115
|
+
const n = a.messages.map((c) => c.text).join(`
|
|
116
|
+
`);
|
|
117
|
+
return { ...t, outputMessage: n };
|
|
118
|
+
}
|
|
119
|
+
const U = async (t, e) => (await i({ text: "Exiting Layer Styling agent" }, e), t), J = async (t, e) => {
|
|
120
|
+
try {
|
|
121
|
+
await i({ text: "Populating layer and field info" }, e);
|
|
122
|
+
const r = [];
|
|
123
|
+
for (const a of t.vectorSearchFieldResults) {
|
|
124
|
+
let o = function(y) {
|
|
125
|
+
const s = l.get(y)?.layerItem;
|
|
126
|
+
return s ? [
|
|
127
|
+
s.name && `Name: ${s.name}`,
|
|
128
|
+
s.title && `Title: ${s.title}`,
|
|
129
|
+
s.description && `Description: ${s.description}`
|
|
130
|
+
].filter(Boolean).join(" | ") : y;
|
|
131
|
+
};
|
|
132
|
+
const { layerId: n, results: c } = a, l = p(e, "layersAndFieldsRegistry"), d = l.get(n)?.fieldRegistry;
|
|
133
|
+
if (!d)
|
|
134
|
+
continue;
|
|
135
|
+
let g = r.find((y) => y.layerId === n);
|
|
136
|
+
g || (g = {
|
|
137
|
+
layerId: n,
|
|
138
|
+
layerSummary: o(n),
|
|
139
|
+
fieldInfos: []
|
|
140
|
+
}, r.push(g));
|
|
141
|
+
for (const y of c) {
|
|
142
|
+
const s = d.get(y.name);
|
|
143
|
+
s && g.fieldInfos.push(s);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return await i({ text: "Populated layerFieldInfo" }, e), { ...t, layerFieldInfo: r };
|
|
147
|
+
} catch (r) {
|
|
148
|
+
throw await i({ text: "Error populating layerFieldInfo" }, e), new Error(`Error populating layerFieldInfo: ${r instanceof Error ? r.message : String(r)}`);
|
|
149
|
+
}
|
|
150
|
+
}, K = (t, e) => {
|
|
151
|
+
const r = t.vectorSearchLayerIds ?? [];
|
|
152
|
+
if (r.length <= 1)
|
|
153
|
+
return { ...t, selectedLayerId: t.vectorSearchLayerIds[0] };
|
|
154
|
+
const { hitlResponse: a } = e.configurable;
|
|
155
|
+
if (a?.agentId !== u.id || a.id !== "reviewLayerSelection") {
|
|
156
|
+
const n = {
|
|
157
|
+
agentId: u.id,
|
|
158
|
+
id: "reviewLayerSelection",
|
|
159
|
+
kind: "singleSelection",
|
|
160
|
+
message: "Choose a layer to apply the styles.",
|
|
161
|
+
metadata: [...r]
|
|
162
|
+
};
|
|
163
|
+
throw new L(n);
|
|
164
|
+
}
|
|
165
|
+
let o = null;
|
|
166
|
+
return Array.isArray(a.payload) && a.payload.length > 0 && (o = a.payload[0]), {
|
|
167
|
+
...t,
|
|
168
|
+
selectedLayerId: o ?? t.vectorSearchLayerIds[0]
|
|
169
|
+
};
|
|
170
|
+
}, O = (t, e) => j(["layerSearch", "fieldSearch", "layersAndFieldsRegistry"], "Layer Styling Agent")(t, e), Q = () => new w(S).addNode("requireLayerStylingServices", O).addNode("vectorSearchLayers", H).addNode("layerSelectionHITL", K).addNode("vectorSearchFields", D).addNode("populateLayerFieldInfo", J).addNode("agent", G).addNode("tools", B).addNode("earlyExit", U).addEdge(E, "requireLayerStylingServices").addEdge("requireLayerStylingServices", "vectorSearchLayers").addConditionalEdges(
|
|
171
|
+
"layerSelectionHITL",
|
|
172
|
+
(e) => e.vectorSearchLayerIds.length ? "vectorSearchFields" : "earlyExit"
|
|
173
|
+
).addConditionalEdges(
|
|
174
|
+
"vectorSearchFields",
|
|
175
|
+
(e) => e.vectorSearchFieldResults.length ? "populateLayerFieldInfo" : "earlyExit"
|
|
176
|
+
).addEdge("populateLayerFieldInfo", "agent").addEdge("agent", "tools").addEdge("tools", m).addEdge("earlyExit", m), W = String.raw`- **layerStyling** — User wants to change how features are drawn or styled on the map based on their data, such as applying color, size, transparency, symbols, or charts according to field values.
|
|
177
|
+
_Example: “Color points by sales amount”_
|
|
178
|
+
_Example: “Show population density with a color gradient”_
|
|
179
|
+
_Example: “Create a relationship map between height and depth”_
|
|
180
|
+
_Example: “Vary circle sizes according to population”_`, u = {
|
|
181
|
+
id: "layerStyling",
|
|
182
|
+
name: "Layer Styling Agent",
|
|
183
|
+
description: W,
|
|
184
|
+
createGraph: Q,
|
|
185
|
+
workspace: S
|
|
186
|
+
};
|
|
187
|
+
export {
|
|
188
|
+
u as L
|
|
189
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e = `This Feature Layer is part of a Feature Service. The Feature Layer contains various fields, each with its own name, type, and description.
|
|
3
|
+
The Feature Layer is a collection of geographic features that represent real-world entities. Each feature in the layer has attributes that provide additional information about the feature. The layer may include point, line, or polygon geometries, depending on the type of data it represents.
|
|
4
|
+
The geometry type for this layer is {layerGeometryType}.
|
|
5
|
+
|
|
6
|
+
Here is the field information for each field in the Feature Layer. Each field has a name, alias, type, valueType and description. These should help you understand the data represented in the Feature Layer.
|
|
7
|
+
|
|
8
|
+
Field Descriptions:
|
|
9
|
+
{fieldInformation}
|
|
10
|
+
|
|
11
|
+
Your task is to :
|
|
12
|
+
|
|
13
|
+
- analyze the field descriptions to understand the data represented in the Feature Layer.
|
|
14
|
+
- Generate the following for the layer:
|
|
15
|
+
- a title: a concise title that accurately reflects the content and purpose of the feature service.
|
|
16
|
+
- a description: a detailed description of the feature layer
|
|
17
|
+
|
|
18
|
+
Consider the following aspects in your description:
|
|
19
|
+
|
|
20
|
+
- purpose of this feature layer
|
|
21
|
+
- types of data and geometric entities represented in the layer
|
|
22
|
+
- sources of the layer information and the geographic area covered
|
|
23
|
+
- potential applications and usefulness of the feature layer in the GIS world
|
|
24
|
+
|
|
25
|
+
If any of the above topics are not applicable, you can skip them. Don't include statements that indicate something this Feature Layer is not or does not have. Avoid listing field names, types, and other technical details.
|
|
26
|
+
|
|
27
|
+
Instructions while generating the title:
|
|
28
|
+
|
|
29
|
+
- Avoid using special characters in the title.
|
|
30
|
+
- Avoid using 'layer' in the title.
|
|
31
|
+
- Avoid using all uppercase letters in the title. Use title case instead.
|
|
32
|
+
- The title should not be too long.
|
|
33
|
+
|
|
34
|
+
You are given Feature Layer descriptions and title.
|
|
35
|
+
|
|
36
|
+
## Existing layer details filled in by a human:
|
|
37
|
+
|
|
38
|
+
{existingLayerTitle}
|
|
39
|
+
{existingLayerSnippet}
|
|
40
|
+
{existingLayerDescription}
|
|
41
|
+
|
|
42
|
+
## Instructions on how to use the information filled in by a human:
|
|
43
|
+
|
|
44
|
+
Remember humans may have more information about the item than just the field and layer descriptions.
|
|
45
|
+
|
|
46
|
+
- Use this information ONLY IF it helps you understand the item better.
|
|
47
|
+
- Use this information ONLY IF it helps you generate a better description and title.
|
|
48
|
+
- Use your knowledge from this information to compensate for any important information that is missing in the field and layer descriptions.
|
|
49
|
+
|
|
50
|
+
## Instructions on what to avoid doing with the information filled in by a human:
|
|
51
|
+
|
|
52
|
+
- you must not use this information in your response as it is.
|
|
53
|
+
- you must not think of this information as the final version.
|
|
54
|
+
- you must not use this information to generate a response without analyzing it.
|
|
55
|
+
- you must not copy this information verbatim in your response.
|
|
56
|
+
`;
|
|
57
|
+
export {
|
|
58
|
+
e as default
|
|
59
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e = `# ArcGIS Online Map Viewer — Smart Mapping Assistant
|
|
3
|
+
|
|
4
|
+
You are a Smart Mapping Assistant for ArcGIS Online Map Viewer.
|
|
5
|
+
|
|
6
|
+
**Your job:**
|
|
7
|
+
Given a set of layers with their fields and a user request, call the appropriate layer styling tools to apply the best mapping style(s) for each layer.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## **Available Layers and Fields:**
|
|
12
|
+
|
|
13
|
+
{layerFieldInfo}
|
|
14
|
+
|
|
15
|
+
**FieldInfo:**
|
|
16
|
+
|
|
17
|
+
- \`name\`: the actual field name (use this exact name)
|
|
18
|
+
- \`type\`: one of \`string\`, \`number\`, \`date\`, etc.
|
|
19
|
+
- \`alias\`: a human-readable label
|
|
20
|
+
- \`description\`: optional field metadata
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## **Available Color Schemes:**
|
|
25
|
+
|
|
26
|
+
\`reds\`, \`yellows\`, \`oranges\`, \`greens\`, \`blues\`, \`purples\`, \`pinks\`, \`browns\`, \`grays\`, \`subdued\`, \`diverging\`, \`sequential\`, \`categorical\`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## **Available Themes:**
|
|
31
|
+
|
|
32
|
+
1. **high-to-low** - High values are emphasized with saturated colors. Low values are de-emphasized with diminished colors.
|
|
33
|
+
- Keywords: continuous, high to low, unclassed, gradient, sequential
|
|
34
|
+
- Example: Show the percent of the population that owns a home along a sequential color ramp.
|
|
35
|
+
|
|
36
|
+
2. **above** - Emphasize values that are above a value, such as the mean.
|
|
37
|
+
- Keywords: over, increasing, up, growth, above
|
|
38
|
+
- Example: Use color to show areas where the hispanic population is above the mean.
|
|
39
|
+
|
|
40
|
+
3. **below** - Emphasize values that are below a value, such as the mean.
|
|
41
|
+
- Keywords: under, decreasing, down, shrinking, decline, drop, below
|
|
42
|
+
- Example: Show the number of vacant homes below the mean.
|
|
43
|
+
|
|
44
|
+
4. **centered-on** - Emphasize values that are near a key value.
|
|
45
|
+
- Keywords: centered on, focused on average, highlight average, competitive, close
|
|
46
|
+
- Example: Use color to show the areas where the percent of the republican votes is close to the percent of democratic votes.
|
|
47
|
+
|
|
48
|
+
5. **above-and-below** - When both high values and low values need emphasis.
|
|
49
|
+
- Keywords: diverging, above or below, bi-directional, over or under, growing or shrinking, growth or decline
|
|
50
|
+
- Example: Show the median household income above and below the national average.
|
|
51
|
+
|
|
52
|
+
6. **extremes** - When only the highest or lowest values need emphasis.
|
|
53
|
+
- Keywords: extremes, outliers
|
|
54
|
+
- Example: Emphasize the outliers of the votes for Democrats in the 2020 presidential election.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## **Instructions:**
|
|
59
|
+
|
|
60
|
+
- Call the appropriate tool for the layer based on the user's request
|
|
61
|
+
- Use exact field names from the layer info (not aliases)
|
|
62
|
+
- Use exact layer IDs from the layer info
|
|
63
|
+
- Match field types to tool requirements (each tool describes its field requirements in its description)
|
|
64
|
+
- Select appropriate color schemes and themes based on the data and user intent, only if user asks for them
|
|
65
|
+
- If the user asks for a specific style, use that tool
|
|
66
|
+
- If the user is vague, use your judgment to recommend the best tool
|
|
67
|
+
|
|
68
|
+
**Remember:** Each layer styling tool will apply a renderer to a layer, make it visible, and return results.
|
|
69
|
+
`;
|
|
70
|
+
export {
|
|
71
|
+
e as default
|
|
72
|
+
};
|