@arcgis/ai-components 5.2.0-next.6 → 5.2.0-next.61

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.
Files changed (208) hide show
  1. package/README.md +2 -2
  2. package/dist/agent-utils/FunctionAgent.d.ts +2 -2
  3. package/dist/agent-utils/LLMAgent.d.ts +2 -2
  4. package/dist/agent-utils/LLMAgent.js +2 -1
  5. package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
  6. package/dist/agent-utils/index.d.ts +177 -0
  7. package/dist/agent-utils/index.js +167 -0
  8. package/dist/agent-utils/middlewares/trace.d.ts +2 -0
  9. package/dist/agent-utils/middlewares/trace.js +25 -33
  10. package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
  11. package/dist/agent-utils/types.d.ts +36 -7
  12. package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
  13. package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
  14. package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
  15. package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
  16. package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
  17. package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
  18. package/dist/cdn/242OOJML.js +2 -0
  19. package/dist/cdn/275NKWUE.js +22 -0
  20. package/dist/cdn/2WDZIJQR.js +2 -0
  21. package/dist/cdn/2XQAM2Q3.js +4 -0
  22. package/dist/cdn/3DJDRAGV.js +2 -0
  23. package/dist/cdn/{AMP6IALT.js → 3UEKINYC.js} +1 -1
  24. package/dist/cdn/3YCSUTGV.js +14 -0
  25. package/dist/cdn/3ZPPYCNL.js +2 -0
  26. package/dist/cdn/434TAA3J.js +2 -0
  27. package/dist/cdn/4CEMUECT.js +2 -0
  28. package/dist/cdn/57OMVTIU.js +2 -0
  29. package/dist/cdn/5L7VPEQM.js +2 -0
  30. package/dist/cdn/6U7TEAAJ.js +2 -0
  31. package/dist/cdn/7NP7WGR5.js +2 -0
  32. package/dist/cdn/AHLLB5QW.js +2 -0
  33. package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
  34. package/dist/cdn/APFZY4PI.js +2 -0
  35. package/dist/cdn/AYMUK2MC.js +36 -0
  36. package/dist/cdn/BE7ZN5FZ.js +2 -0
  37. package/dist/cdn/BI3LK5D3.js +2 -0
  38. package/dist/cdn/{FL4W4VYN.js → BL273EGZ.js} +17 -1
  39. package/dist/cdn/BSP6IJY4.js +2 -0
  40. package/dist/cdn/{5ZZGKP7N.js → CEKOEHB3.js} +1 -1
  41. package/dist/cdn/CWZEQ4R6.js +2 -0
  42. package/dist/cdn/{VOQX4AVB.js → FC45FF2D.js} +6 -4
  43. package/dist/cdn/FNPLHH4E.js +3 -0
  44. package/dist/cdn/FVDFPK3V.js +18 -0
  45. package/dist/cdn/{ZLXN7NMF.js → FYZATVB3.js} +10 -8
  46. package/dist/cdn/GLOALVJR.js +3 -0
  47. package/dist/cdn/HBLRVXEB.js +2 -0
  48. package/dist/cdn/HJG7QM2R.js +9 -0
  49. package/dist/cdn/HLO655UO.js +2 -0
  50. package/dist/cdn/HPSVZVAR.js +2 -0
  51. package/dist/cdn/HQXPPYMD.js +2 -0
  52. package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
  53. package/dist/cdn/ICYUPLZM.js +56 -0
  54. package/dist/cdn/IEHPNCTL.js +2 -0
  55. package/dist/cdn/IHP25JWI.js +99 -0
  56. package/dist/cdn/J6A4AS7E.js +22 -0
  57. package/dist/cdn/{NE7E52YR.js → JEBRN3EU.js} +9 -3
  58. package/dist/cdn/JHFOZPBP.js +2 -0
  59. package/dist/cdn/L4SS54EZ.js +2 -0
  60. package/dist/cdn/LHLO6PTD.js +2 -0
  61. package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
  62. package/dist/cdn/LUJCH5V7.js +2 -0
  63. package/dist/cdn/LUY6V4TP.js +181 -0
  64. package/dist/cdn/M3MRIGDZ.js +2 -0
  65. package/dist/cdn/MSDNERUF.js +2 -0
  66. package/dist/cdn/MWYBF3F3.js +66 -0
  67. package/dist/cdn/NEV6OZN3.js +71 -0
  68. package/dist/cdn/NQROZZHC.js +65 -0
  69. package/dist/cdn/NSER3L4A.js +2 -0
  70. package/dist/cdn/OI7EGYZU.js +2 -0
  71. package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
  72. package/dist/cdn/OY2P2O47.js +180 -0
  73. package/dist/cdn/OYNIFMCJ.js +2 -0
  74. package/dist/cdn/PJ3UN2RU.js +2 -0
  75. package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
  76. package/dist/cdn/PVE7Q43N.js +2 -0
  77. package/dist/cdn/QBINZNXI.js +9 -0
  78. package/dist/cdn/QZLE7B6X.js +2 -0
  79. package/dist/cdn/R74ZHFA6.js +2 -0
  80. package/dist/cdn/RAAV47KU.js +3 -0
  81. package/dist/cdn/RLEHNAIA.js +2 -0
  82. package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
  83. package/dist/cdn/SLXOVE7Y.js +2 -0
  84. package/dist/cdn/TFT6HK3O.js +208 -0
  85. package/dist/cdn/THXUE6R4.js +2 -0
  86. package/dist/cdn/TPULIO6I.js +34 -0
  87. package/dist/cdn/U4Z5XNJ5.js +2 -0
  88. package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
  89. package/dist/cdn/UZLQALHY.js +2 -0
  90. package/dist/cdn/V6HOUZPZ.js +2 -0
  91. package/dist/cdn/VAXH6RUQ.js +134 -0
  92. package/dist/cdn/{H7422XUG.js → VCXSQWGA.js} +1 -1
  93. package/dist/cdn/VXFQANGJ.js +2 -0
  94. package/dist/cdn/WHOZT5H5.js +48 -0
  95. package/dist/cdn/WY7B6IMH.js +2 -0
  96. package/dist/cdn/XCRR2EEG.js +6 -0
  97. package/dist/cdn/XVPBO2JC.js +2 -0
  98. package/dist/cdn/YHQJ66WJ.js +2 -0
  99. package/dist/cdn/ZS6SXJP2.js +2 -0
  100. package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
  101. package/dist/cdn/agent-utils/index.js +2 -0
  102. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +3 -0
  103. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -0
  104. package/dist/cdn/agent-utils/middlewares/trace.js +2 -0
  105. package/dist/cdn/index.js +1 -1
  106. package/dist/chunks/adapter.js +1794 -1597
  107. package/dist/chunks/arcgisKnowledgeGraph.js +127 -72
  108. package/dist/chunks/arcgis_knowledge_current_lc_context.js +19 -2
  109. package/dist/chunks/arcgis_knowledge_current_map_context.js +31 -2
  110. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
  111. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +116 -27
  112. package/dist/chunks/converterUtils.js +39 -32
  113. package/dist/chunks/dataExplorationGraph.js +140 -114
  114. package/dist/chunks/data_explore_query_prompt.js +9 -4
  115. package/dist/chunks/generateLayerDescriptions.js +239 -225
  116. package/dist/chunks/helpGraph.js +30 -23
  117. package/dist/chunks/help_prompt.js +34 -17
  118. package/dist/chunks/index.js +11 -0
  119. package/dist/chunks/intent_prompt.js +16 -0
  120. package/dist/chunks/layerStylingGraph.js +25 -21
  121. package/dist/chunks/navigationGraph.js +70 -62
  122. package/dist/chunks/navigation_intent_prompt.js +8 -2
  123. package/dist/chunks/orchestrator.js +110 -108
  124. package/dist/chunks/slottableRequestUtils.js +3 -7
  125. package/dist/chunks/state.js +1 -1
  126. package/dist/chunks/summarize_query_response_prompt.js +9 -7
  127. package/dist/chunks/toolCallResponse.js +13 -10
  128. package/dist/chunks/utils2.js +8 -8
  129. package/dist/components/arcgis-assistant/customElement.d.ts +27 -0
  130. package/dist/components/arcgis-assistant/customElement.js +386 -152
  131. package/dist/components/arcgis-assistant/index.js +2 -3
  132. package/dist/components/arcgis-assistant/types.d.ts +14 -1
  133. package/dist/components/arcgis-assistant-agent/customElement.js +5 -1
  134. package/dist/components/arcgis-assistant-chat/customElement.d.ts +2 -1
  135. package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
  136. package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +2 -0
  137. package/dist/components/arcgis-assistant-chat-entry/customElement.js +25 -18
  138. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +12 -6
  139. package/dist/components/arcgis-assistant-help-agent/customElement.js +9 -3
  140. package/dist/components/arcgis-assistant-interrupt/customElement.js +12 -8
  141. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +20 -0
  142. package/dist/components/arcgis-assistant-interrupt-preview/index.js +2 -0
  143. package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
  144. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +18 -12
  145. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +11 -5
  146. package/dist/components/arcgis-assistant-message/customElement.d.ts +2 -0
  147. package/dist/components/arcgis-assistant-message/customElement.js +28 -26
  148. package/dist/components/arcgis-assistant-message/index.js +2 -0
  149. package/dist/components/arcgis-assistant-message-block/customElement.js +18 -11
  150. package/dist/components/arcgis-assistant-message-block/index.js +1 -0
  151. package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +4 -0
  152. package/dist/components/arcgis-assistant-message-loading/customElement.js +10 -10
  153. package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
  154. package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
  155. package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
  156. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +12 -6
  157. package/dist/components/arcgis-assistant-speech-input/customElement.js +29 -46
  158. package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +8 -8
  159. package/dist/components/arcgis-assistant-user-message/customElement.js +10 -8
  160. package/dist/docs/api.json +1 -1
  161. package/dist/docs/docs.json +1 -1
  162. package/dist/docs/vscode.html-custom-data.json +1 -1
  163. package/dist/docs/web-types.json +1 -1
  164. package/dist/loader.js +7 -6
  165. package/dist/oauth-callback.html +1 -1
  166. package/dist/types/lumina.d.ts +7 -6
  167. package/dist/types/preact.d.ts +7 -6
  168. package/dist/types/react.d.ts +7 -6
  169. package/dist/types/stencil.d.ts +7 -6
  170. package/dist/utils/index.d.ts +94 -47
  171. package/dist/utils/index.js +80 -65
  172. package/package.json +13 -12
  173. package/dist/cdn/2AXF774U.js +0 -2
  174. package/dist/cdn/3NI46YCE.js +0 -2
  175. package/dist/cdn/3PKJWIC3.js +0 -2
  176. package/dist/cdn/462JBSEV.js +0 -422
  177. package/dist/cdn/47FWPQ2A.js +0 -16
  178. package/dist/cdn/5QAHYX7Y.js +0 -5
  179. package/dist/cdn/7BCR6TUO.js +0 -2
  180. package/dist/cdn/7GH7VSB2.js +0 -2
  181. package/dist/cdn/7PLV4QH6.js +0 -2
  182. package/dist/cdn/AEJHYRGT.js +0 -166
  183. package/dist/cdn/AO7BQHKC.js +0 -2
  184. package/dist/cdn/AXDZBBNL.js +0 -45
  185. package/dist/cdn/BFZJNJL6.js +0 -22
  186. package/dist/cdn/DDLZOMUY.js +0 -2
  187. package/dist/cdn/DHOVCT6R.js +0 -2
  188. package/dist/cdn/F2AHA4GB.js +0 -54
  189. package/dist/cdn/FX5JFRDL.js +0 -2
  190. package/dist/cdn/GCQLVNNC.js +0 -14
  191. package/dist/cdn/HB5A5R2E.js +0 -2
  192. package/dist/cdn/JV4SI65E.js +0 -108
  193. package/dist/cdn/KMQ3SP4I.js +0 -5
  194. package/dist/cdn/MH5RPXHM.js +0 -2
  195. package/dist/cdn/NAUXSHIE.js +0 -72
  196. package/dist/cdn/NVI3I46B.js +0 -2
  197. package/dist/cdn/OAVEHGB6.js +0 -2
  198. package/dist/cdn/OH64RMOR.js +0 -4
  199. package/dist/cdn/P6OPJQMC.js +0 -3
  200. package/dist/cdn/QR54T33D.js +0 -2
  201. package/dist/cdn/R6HV42YW.js +0 -3
  202. package/dist/cdn/RVOAPUBN.js +0 -2
  203. package/dist/cdn/SXDLXCIM.js +0 -2
  204. package/dist/cdn/USMDJUFS.js +0 -2
  205. package/dist/cdn/V2P4AIGG.js +0 -2
  206. package/dist/cdn/V7OJRG26.js +0 -36
  207. package/dist/cdn/Y333DGV6.js +0 -2
  208. package/dist/cdn/YIMNOUTF.js +0 -2
@@ -23,7 +23,7 @@ import type { ArcgisAssistantUserMessage } from "../components/arcgis-assistant-
23
23
  import type { HTMLProps } from 'react';
24
24
  import type { EventHandler } from "@arcgis/lumina";
25
25
 
26
- interface ReactArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "suggestedPrompts">>, HTMLProps<ArcgisAssistant> {
26
+ interface ReactArcgisAssistant extends Partial<Pick<ArcgisAssistant, "assistantAvatarEnabled" | "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "streamingDisabled" | "suggestedPrompts">>, HTMLProps<ArcgisAssistant> {
27
27
  onarcgisCancel?: EventHandler<ArcgisAssistant["arcgisCancel"]>;
28
28
  onarcgisError?: EventHandler<ArcgisAssistant["arcgisError"]>;
29
29
  onarcgisFeedback?: EventHandler<ArcgisAssistant["arcgisFeedback"]>;
@@ -32,6 +32,7 @@ interface ReactArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnable
32
32
  onarcgisInterruptSubmit?: EventHandler<ArcgisAssistant["arcgisInterruptSubmit"]>;
33
33
  onarcgisPromptSelect?: EventHandler<ArcgisAssistant["arcgisPromptSelect"]>;
34
34
  onarcgisReady?: EventHandler<ArcgisAssistant["arcgisReady"]>;
35
+ onarcgisResponse?: EventHandler<ArcgisAssistant["arcgisResponse"]>;
35
36
  onarcgisSlottableRequest?: EventHandler<ArcgisAssistant["arcgisSlottableRequest"]>;
36
37
  onarcgisSubmit?: EventHandler<ArcgisAssistant["arcgisSubmit"]>;
37
38
  }
@@ -54,10 +55,10 @@ interface ReactArcgisAssistantLayerStylingAgent extends Partial<Pick<ArcgisAssis
54
55
  interface ReactArcgisAssistantNavigationAgent extends Partial<Pick<ArcgisAssistantNavigationAgent, "referenceElement">>, HTMLProps<ArcgisAssistantNavigationAgent> {
55
56
  }
56
57
 
57
- interface ReactArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "loading" | "messages">>, HTMLProps<ArcgisAssistantChat> {
58
+ interface ReactArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "interrupt" | "loading" | "messages">>, HTMLProps<ArcgisAssistantChat> {
58
59
  }
59
60
 
60
- interface ReactArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, HTMLProps<ArcgisAssistantChatEntry> {
61
+ interface ReactArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "disabled" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, HTMLProps<ArcgisAssistantChatEntry> {
61
62
  onarcgisCancel?: EventHandler<ArcgisAssistantChatEntry["arcgisCancel"]>;
62
63
  onarcgisSubmit?: EventHandler<ArcgisAssistantChatEntry["arcgisSubmit"]>;
63
64
  }
@@ -67,7 +68,7 @@ interface ReactArcgisAssistantInterrupt extends Partial<Pick<ArcgisAssistantInte
67
68
  onarcgisSubmit?: EventHandler<ArcgisAssistantInterrupt["arcgisSubmit"]>;
68
69
  }
69
70
 
70
- interface ReactArcgisAssistantMessage extends Partial<Pick<ArcgisAssistantMessage, "copyEnabled" | "feedbackEnabled" | "footerDisabled" | "logEnabled" | "message" | "readAloudEnabled">>, HTMLProps<ArcgisAssistantMessage> {
71
+ interface ReactArcgisAssistantMessage extends Partial<Pick<ArcgisAssistantMessage, "assistantAvatarEnabled" | "copyEnabled" | "feedbackEnabled" | "footerDisabled" | "logEnabled" | "message" | "readAloudEnabled">>, HTMLProps<ArcgisAssistantMessage> {
71
72
  }
72
73
 
73
74
  interface ReactArcgisAssistantMessageBlock extends Partial<Pick<ArcgisAssistantMessageBlock, "block">>, HTMLProps<ArcgisAssistantMessageBlock> {
@@ -80,7 +81,7 @@ interface ReactArcgisAssistantMessageFeedback extends Partial<Pick<ArcgisAssista
80
81
  interface ReactArcgisAssistantMessageFooter extends Partial<Pick<ArcgisAssistantMessageFooter, "copyEnabled" | "feedbackEnabled" | "logEnabled" | "message" | "readAloudEnabled">>, HTMLProps<ArcgisAssistantMessageFooter> {
81
82
  }
82
83
 
83
- interface ReactArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "loading" | "loadingMessage">>, HTMLProps<ArcgisAssistantMessageLoading> {
84
+ interface ReactArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "assistantAvatarEnabled" | "interrupts" | "loading" | "loadingMessage">>, HTMLProps<ArcgisAssistantMessageLoading> {
84
85
  }
85
86
 
86
87
  interface ReactArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantMessageLog, "log" | "logEnabled" | "showLog">>, HTMLProps<ArcgisAssistantMessageLog> {
@@ -89,7 +90,7 @@ interface ReactArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantMes
89
90
  interface ReactArcgisAssistantMessageReadAloud extends Partial<Pick<ArcgisAssistantMessageReadAloud, "message" | "readAloudEnabled">>, HTMLProps<ArcgisAssistantMessageReadAloud> {
90
91
  }
91
92
 
92
- interface ReactArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content">>, HTMLProps<ArcgisAssistantMessageText> {
93
+ interface ReactArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content" | "parts">>, HTMLProps<ArcgisAssistantMessageText> {
93
94
  }
94
95
 
95
96
  interface ReactArcgisAssistantSpeechInput extends Partial<Pick<ArcgisAssistantSpeechInput, "awaitingResponse" | "inputValue" | "language" | "mode">>, HTMLProps<ArcgisAssistantSpeechInput> {
@@ -23,7 +23,7 @@ import type { ArcgisAssistantUserMessage } from "../components/arcgis-assistant-
23
23
  import { JSXBase as StencilJsx } from "@stencil/core/internal";
24
24
  import type { EventHandler } from "@arcgis/lumina";
25
25
 
26
- interface StencilArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "suggestedPrompts">>, StencilJsx.HTMLAttributes<ArcgisAssistant> {
26
+ interface StencilArcgisAssistant extends Partial<Pick<ArcgisAssistant, "assistantAvatarEnabled" | "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "streamingDisabled" | "suggestedPrompts">>, StencilJsx.HTMLAttributes<ArcgisAssistant> {
27
27
  onArcgisCancel?: EventHandler<ArcgisAssistant["arcgisCancel"]>;
28
28
  onArcgisError?: EventHandler<ArcgisAssistant["arcgisError"]>;
29
29
  onArcgisFeedback?: EventHandler<ArcgisAssistant["arcgisFeedback"]>;
@@ -32,6 +32,7 @@ interface StencilArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnab
32
32
  onArcgisInterruptSubmit?: EventHandler<ArcgisAssistant["arcgisInterruptSubmit"]>;
33
33
  onArcgisPromptSelect?: EventHandler<ArcgisAssistant["arcgisPromptSelect"]>;
34
34
  onArcgisReady?: EventHandler<ArcgisAssistant["arcgisReady"]>;
35
+ onArcgisResponse?: EventHandler<ArcgisAssistant["arcgisResponse"]>;
35
36
  onArcgisSlottableRequest?: EventHandler<ArcgisAssistant["arcgisSlottableRequest"]>;
36
37
  onArcgisSubmit?: EventHandler<ArcgisAssistant["arcgisSubmit"]>;
37
38
  }
@@ -54,10 +55,10 @@ interface StencilArcgisAssistantLayerStylingAgent extends Partial<Pick<ArcgisAss
54
55
  interface StencilArcgisAssistantNavigationAgent extends Partial<Pick<ArcgisAssistantNavigationAgent, "referenceElement">>, StencilJsx.HTMLAttributes<ArcgisAssistantNavigationAgent> {
55
56
  }
56
57
 
57
- interface StencilArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "loading" | "messages">>, StencilJsx.HTMLAttributes<ArcgisAssistantChat> {
58
+ interface StencilArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "interrupt" | "loading" | "messages">>, StencilJsx.HTMLAttributes<ArcgisAssistantChat> {
58
59
  }
59
60
 
60
- interface StencilArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantChatEntry> {
61
+ interface StencilArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "disabled" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantChatEntry> {
61
62
  onArcgisCancel?: EventHandler<ArcgisAssistantChatEntry["arcgisCancel"]>;
62
63
  onArcgisSubmit?: EventHandler<ArcgisAssistantChatEntry["arcgisSubmit"]>;
63
64
  }
@@ -67,7 +68,7 @@ interface StencilArcgisAssistantInterrupt extends Partial<Pick<ArcgisAssistantIn
67
68
  onArcgisSubmit?: EventHandler<ArcgisAssistantInterrupt["arcgisSubmit"]>;
68
69
  }
69
70
 
70
- interface StencilArcgisAssistantMessage extends Partial<Pick<ArcgisAssistantMessage, "copyEnabled" | "feedbackEnabled" | "footerDisabled" | "logEnabled" | "message" | "readAloudEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessage> {
71
+ interface StencilArcgisAssistantMessage extends Partial<Pick<ArcgisAssistantMessage, "assistantAvatarEnabled" | "copyEnabled" | "feedbackEnabled" | "footerDisabled" | "logEnabled" | "message" | "readAloudEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessage> {
71
72
  }
72
73
 
73
74
  interface StencilArcgisAssistantMessageBlock extends Partial<Pick<ArcgisAssistantMessageBlock, "block">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageBlock> {
@@ -80,7 +81,7 @@ interface StencilArcgisAssistantMessageFeedback extends Partial<Pick<ArcgisAssis
80
81
  interface StencilArcgisAssistantMessageFooter extends Partial<Pick<ArcgisAssistantMessageFooter, "copyEnabled" | "feedbackEnabled" | "logEnabled" | "message" | "readAloudEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageFooter> {
81
82
  }
82
83
 
83
- interface StencilArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "loading" | "loadingMessage">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageLoading> {
84
+ interface StencilArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "assistantAvatarEnabled" | "interrupts" | "loading" | "loadingMessage">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageLoading> {
84
85
  }
85
86
 
86
87
  interface StencilArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantMessageLog, "log" | "logEnabled" | "showLog">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageLog> {
@@ -89,7 +90,7 @@ interface StencilArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantM
89
90
  interface StencilArcgisAssistantMessageReadAloud extends Partial<Pick<ArcgisAssistantMessageReadAloud, "message" | "readAloudEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageReadAloud> {
90
91
  }
91
92
 
92
- interface StencilArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageText> {
93
+ interface StencilArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content" | "parts">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageText> {
93
94
  }
94
95
 
95
96
  interface StencilArcgisAssistantSpeechInput extends Partial<Pick<ArcgisAssistantSpeechInput, "awaitingResponse" | "inputValue" | "language" | "mode">>, StencilJsx.HTMLAttributes<ArcgisAssistantSpeechInput> {
@@ -8,8 +8,11 @@ import type { AnnotationRoot, BaseChannel, StateGraph } from "@langchain/langgra
8
8
  import type { ChatOpenAI } from "@langchain/openai";
9
9
  import type { ZodType } from "zod";
10
10
 
11
- export { type CustomConfigurableType } from "../orchestrator";
12
- export { Orchestrator } from "../orchestrator";
11
+ export { type CustomConfigurableType } from "../orchestrator.js";
12
+ export { Orchestrator } from "../orchestrator.js";
13
+
14
+ /** @internal */
15
+ export type ChatModelTier = "advanced" | "default" | "fast";
13
16
 
14
17
  /**
15
18
  * Represents the chat message history between the user and the assistant, including all messages sent and received during the conversation.
@@ -174,8 +177,8 @@ export type ArcgisPromptOptions = {
174
177
  * and produce more accurate and relevant responses.
175
178
  */
176
179
  messages?: ChatHistory;
177
- /** Abort signal for cooperative run cancellation. */
178
- abortSignal?: AbortSignal;
180
+ /** Optional runnable configuration used to derive runtime values (for example, conversation id and abort signal). */
181
+ config?: RunnableConfig;
179
182
  /**
180
183
  * Input variables for the prompt. This can include any relevant variables related to the context
181
184
  * provided to the agent. This may be necessary for determining tool parameters or for providing additional
@@ -309,10 +312,21 @@ export function sendTraceMessage(data: TraceEventData, config?: RunnableConfig):
309
312
  */
310
313
  export function getEmbeddings(inputs: string[]): Promise<number[][]>;
311
314
 
315
+ /**
316
+ * Calculates the cosine similarity between two numeric vectors. This is used to measure the similarity
317
+ * between two embedding vectors, where a score of 1 indicates identical vectors, 0 indicates orthogonal
318
+ * vectors, and -1 indicates opposite vectors.
319
+ *
320
+ * @param vectorA - The first vector array.
321
+ * @param vectorB - The second vector array.
322
+ * @returns A similarity score from -1 (opposite) to 1 (identical).
323
+ */
324
+ export function cosineSimilarity(vectorA: number[], vectorB: number[]): number;
325
+
312
326
  /**
313
327
  * The suggestions emitted by the agent to the user interface.
314
328
  *
315
- * @internal
329
+ * @since 5.1
316
330
  */
317
331
  export type UXSuggestion = {
318
332
  /** The type of suggestion being made. */
@@ -324,32 +338,41 @@ export type UXSuggestion = {
324
338
  /**
325
339
  * Execution status returned by an agent run.
326
340
  *
327
- * @internal
341
+ * @since 5.1
328
342
  */
329
343
  export type AgentStatus = "failed" | "success" | "unknown";
330
344
 
331
345
  /**
332
346
  * Summary of a previously executed agent step.
333
347
  *
334
- * @internal
348
+ * @since 5.1
335
349
  */
336
350
  export interface PriorStep {
351
+ /** The agent that handled the step. */
337
352
  agentId: string;
353
+ /** The task assigned to the agent for this step. */
338
354
  assignedTask: string;
355
+ /** A brief summary of the step's execution. */
339
356
  summary: string;
357
+ /** The execution status of the step. */
340
358
  status: AgentStatus;
341
359
  }
342
360
 
343
361
  /**
344
362
  * Runtime execution context available to agent graph nodes and tools.
345
363
  *
346
- * @internal
364
+ * @since 5.1
347
365
  */
348
366
  export interface AgentExecutionContext<TState extends Record<string, unknown> = Record<string, unknown>> {
367
+ /** The user's original request. */
349
368
  userRequest: string;
369
+ /** The task assigned to the agent. */
350
370
  assignedTask: string;
371
+ /** The message history for the run */
351
372
  messages: ChatHistory;
373
+ /** Previous steps */
352
374
  priorSteps: PriorStep[];
375
+ /** Shared state available to the agent. */
353
376
  sharedState: SharedState<TState>;
354
377
  }
355
378
 
@@ -420,6 +443,9 @@ export const createWebmapEmbeddings: (mapView: MapView) => Promise<{
420
443
  }>;
421
444
  }>;
422
445
 
446
+ /** @internal */
447
+ export type GetContext<TContext extends Record<string, unknown>> = () => Promise<TContext> | TContext;
448
+
423
449
  /** @internal */
424
450
  export interface AgentWithContext<TContext extends Record<string, unknown> = Record<string, unknown>> {
425
451
  agent: AgentRegistration;
@@ -431,37 +457,9 @@ export interface AgentWithContext<TContext extends Record<string, unknown> = Rec
431
457
  }
432
458
 
433
459
  /** @internal */
434
- export function createAgentRuntimeState<TState extends Record<string, unknown> = Record<string, unknown>>(): StatelessAgentBaseState<TState>;
435
-
436
- /** @internal */
437
- export function createAgentRuntimeStateWithSharedState<TState extends Record<string, unknown> = Record<string, unknown>>(): StatefulAgentBaseState<TState>;
438
-
439
- /**
440
- * @param suggestion
441
- * @param config
442
- * @internal
443
- */
444
- export function sendUXSuggestion(suggestion: UXSuggestion, config?: RunnableConfig): Promise<void>;
460
+ export type AgentExecutionContextWithSharedState<TState extends Record<string, unknown> = Record<string, unknown>> = AgentExecutionContext<TState>;
445
461
 
446
462
  /** @internal */
447
- export type SharedStatePatch<T extends Record<string, unknown> = Record<string, unknown>> = {
448
- [K in keyof T]?: SharedStatePatchEntry<T[K]>;
449
- };
450
-
451
- /**
452
- * @param parameter0
453
- * @internal
454
- */
455
- export function createChatModel(parameter0?: {
456
- modelTier?: ChatModelTier;
457
- temperature?: number;
458
- abortSignal?: AbortSignal;
459
- }): Promise<ChatOpenAI>;
460
-
461
- export type ChatModelTier = "advanced" | "default" | "fast";
462
-
463
- export type GetContext<TContext extends Record<string, unknown>> = () => Promise<TContext> | TContext;
464
-
465
463
  export type StatelessAgentBaseState<TState extends Record<string, unknown> = Record<string, unknown>> = {
466
464
  agentExecutionContext: BaseChannel<AgentExecutionContextWithSharedState<TState>, unknown, unknown>;
467
465
  outputMessage: BaseChannel<string, unknown, unknown>;
@@ -469,27 +467,76 @@ export type StatelessAgentBaseState<TState extends Record<string, unknown> = Rec
469
467
  status: BaseChannel<AgentStatus | undefined, unknown, unknown>;
470
468
  };
471
469
 
470
+ /** @internal */
472
471
  export type StatefulAgentBaseState<TState extends Record<string, unknown> = Record<string, unknown>> = StatelessAgentBaseState<TState>
473
472
  & {
474
473
  sharedStatePatch: BaseChannel<SharedStatePatch<TState> | undefined, unknown, unknown>;
475
474
  };
476
475
 
477
- /** Patch shape returned by agents. `meta` is intentionally omitted. */
478
- export type SharedStatePatchEntry<T = unknown> = {
479
- value: T;
480
- };
476
+ /**
477
+ * Creates the standard runtime state for a custom agent graph.
478
+ * Includes common fields used by the assistant flow (request context, output message, summary, and status), so you only add your agent-specific state.
479
+ *
480
+ * @since 5.1
481
+ */
482
+ export function createAgentRuntimeState<TState extends Record<string, unknown> = Record<string, unknown>>(): StatelessAgentBaseState<TState>;
481
483
 
482
- export type SharedState<T extends Record<string, unknown> = Record<string, unknown>> = {
483
- [K in keyof T]?: SharedStateEntry<T[K]>;
484
- };
484
+ /**
485
+ * Creates the standard runtime state for a custom agent graph, plus support for shared state updates.
486
+ * Use this when your agent needs to write values that other agents can read later in the same orchestration flow.
487
+ *
488
+ * @since 5.1
489
+ */
490
+ export function createAgentRuntimeStateWithSharedState<TState extends Record<string, unknown> = Record<string, unknown>>(): StatefulAgentBaseState<TState>;
485
491
 
486
- export type AgentExecutionContextWithSharedState<TState extends Record<string, unknown> = Record<string, unknown>> = AgentExecutionContext<TState>;
492
+ /**
493
+ * Sends an optional UX suggestion from an agent run to the host application.
494
+ * Use this for non-blocking hints (for example, recommended next actions or UI prompts) that the app may choose to display.
495
+ *
496
+ * @param suggestion
497
+ * @param config
498
+ * @since 5.1
499
+ */
500
+ export function sendUXSuggestion(suggestion: UXSuggestion, config?: RunnableConfig): Promise<void>;
487
501
 
488
- /** Stored shared state entry. `meta` is added by the orchestrator. */
502
+ /** @internal */
489
503
  export type SharedStateEntry<T = unknown> = {
490
504
  value: T;
491
505
  meta: {
492
506
  updatedByAgentId: string;
493
507
  updatedAt: number;
494
508
  };
495
- };
509
+ };
510
+
511
+ /** @internal */
512
+ export type SharedStatePatchEntry<T = unknown> = {
513
+ value: T;
514
+ };
515
+
516
+ /**
517
+ * Shared state that can be read and updated during agent execution.
518
+ *
519
+ * @since 5.1
520
+ */
521
+ export type SharedState<T extends Record<string, unknown> = Record<string, unknown>> = {
522
+ [K in keyof T]?: SharedStateEntry<T[K]>;
523
+ };
524
+
525
+ /**
526
+ * Partial shared state returned by an agent for merging into the current run state.
527
+ *
528
+ * @since 5.1
529
+ */
530
+ export type SharedStatePatch<T extends Record<string, unknown> = Record<string, unknown>> = {
531
+ [K in keyof T]?: SharedStatePatchEntry<T[K]>;
532
+ };
533
+
534
+ /**
535
+ * @param parameter0
536
+ * @internal
537
+ */
538
+ export function createChatModel(parameter0?: {
539
+ modelTier?: ChatModelTier;
540
+ temperature?: number;
541
+ config?: RunnableConfig;
542
+ }): Promise<ChatOpenAI>;
@@ -1,101 +1,116 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { g as p } from "../chunks/orchestrator.js";
3
- import { O as ge } from "../chunks/orchestrator.js";
4
- import { g as A, a as h, W as v, f as g, l as f, d as S, m as w, b as $, e as b, i as L, h as P, j as E, s as T, k as R, n as k, c as D, o as W } from "../chunks/generateLayerDescriptions.js";
5
- import x from "@arcgis/core/layers/FeatureLayer.js";
6
- import * as F from "@arcgis/core/core/reactiveUtils.js";
7
- import { N as M } from "../chunks/navigationGraph.js";
3
+ import { O as ue } from "../chunks/orchestrator.js";
4
+ import { s as h, a as A } from "../chunks/index.js";
5
+ import { g as S, a as v, W as w, f, l as y, d as $, m as b, b as E, s as L, i as P, e as M, h as T, j as R, k, c as x } from "../chunks/generateLayerDescriptions.js";
6
+ import D from "@arcgis/core/layers/FeatureLayer.js";
7
+ import * as W from "@arcgis/core/core/reactiveUtils.js";
8
+ import { N as F } from "../chunks/navigationGraph.js";
8
9
  import { L as C } from "../chunks/layerStylingGraph.js";
9
10
  import { D as N } from "../chunks/dataExplorationGraph.js";
10
11
  import { H as z } from "../chunks/helpGraph.js";
11
12
  import { A as H } from "../chunks/arcgisKnowledgeGraph.js";
12
- const I = async (t) => {
13
- const e = t.allLayers.toArray(), s = [], o = /* @__PURE__ */ new Map();
14
- for (const a of e)
15
- if (a instanceof x) {
13
+ const I = async (e) => {
14
+ const t = e.allLayers.toArray(), s = [], o = /* @__PURE__ */ new Map();
15
+ for (const a of t)
16
+ if (a instanceof D) {
16
17
  const m = (async () => {
17
- const r = await A(a), c = await h(a, r);
18
- o.set(a.id, { layerItem: c, fieldRegistry: r });
18
+ const r = await S(a), n = await v(a, r);
19
+ o.set(a.id, { layerItem: n, fieldRegistry: r });
19
20
  })();
20
21
  s.push(m);
21
22
  }
22
23
  return await Promise.all(s), o;
23
- }, O = async (t) => {
24
- await F.whenOnce(() => t.ready);
25
- const e = await I(t.map), { layers: s } = await U(e), o = {
26
- schemaVersion: b,
24
+ }, O = async (e) => {
25
+ await W.whenOnce(() => e.ready);
26
+ const t = await I(e.map), { layers: s } = await U(t), o = {
27
+ schemaVersion: L,
27
28
  modified: Date.now(),
28
29
  embeddings: {
29
- modelProvider: $,
30
- model: w,
31
- dimensions: S,
30
+ modelProvider: E,
31
+ model: b,
32
+ dimensions: $,
32
33
  templates: {
33
- layer: f,
34
- field: g
34
+ layer: y,
35
+ field: f
35
36
  }
36
37
  },
37
38
  layers: s
38
- }, a = v.safeParse(o);
39
+ }, a = w.safeParse(o);
39
40
  if (!a.success)
40
41
  throw console.error("Schema Mismatch:", a.error.format()), new Error("Webmap embedding generation failed validation.");
41
42
  return a.data;
42
- }, U = async (t) => {
43
- const e = [], s = [];
44
- for (const [r, { fieldRegistry: c, layerItem: n }] of t.entries()) {
45
- const y = l(f, {
46
- name: n.name,
47
- title: n.title,
48
- description: n.description
43
+ }, U = async (e) => {
44
+ const t = [], s = [];
45
+ for (const [r, { fieldRegistry: n, layerItem: i }] of e.entries()) {
46
+ const l = g(y, {
47
+ name: i.name,
48
+ title: i.title,
49
+ description: i.description
49
50
  });
50
- e.push(y);
51
+ t.push(l);
51
52
  const d = {
52
53
  id: r,
53
- name: n.name ?? "",
54
- title: n.title,
55
- description: n.description,
54
+ name: i.name ?? "",
55
+ title: i.title,
56
+ description: i.description,
56
57
  vector: [],
57
58
  fields: []
58
59
  };
59
- for (const [, i] of c.entries()) {
60
- const u = l(g, {
61
- name: i.name,
62
- alias: i.alias,
63
- description: i.description
60
+ for (const [, c] of n.entries()) {
61
+ const u = g(f, {
62
+ name: c.name,
63
+ alias: c.alias,
64
+ description: c.description
64
65
  });
65
- e.push(u), d.fields.push({
66
- name: i.name,
67
- alias: i.alias,
68
- description: i.description,
66
+ t.push(u), d.fields.push({
67
+ name: c.name,
68
+ alias: c.alias,
69
+ description: c.description,
69
70
  vector: []
70
71
  });
71
72
  }
72
73
  s.push(d);
73
74
  }
74
- const o = await p(e);
75
+ const o = await p(t);
75
76
  let a = 0;
76
- return { layers: s.map((r) => (r.vector = o[a++], r.fields.forEach((c) => {
77
- c.vector = o[a++];
77
+ return { layers: s.map((r) => (r.vector = o[a++], r.fields.forEach((n) => {
78
+ n.vector = o[a++];
78
79
  }), r)) };
79
- }, l = (t, e) => t.replace(/\{(\w+)\}/gu, (s, o) => e[o] ?? ""), J = P, Q = L, Y = E, Z = T, ee = p, te = M, ae = C, se = N, oe = z, re = H, ne = O, ie = () => R(), ce = () => k(), me = async (t, e) => await W(t, e), de = async ({
80
- modelTier: t = "default",
81
- temperature: e = 0,
82
- abortSignal: s
83
- } = {}) => await D({ modelTier: t, temperature: e, abortSignal: s });
80
+ }, g = (e, t) => e.replace(/\{(\w+)\}/gu, (s, o) => t[o] ?? ""), V = (e, t) => {
81
+ if (e.length !== t.length)
82
+ throw new Error("Vectors must be the same length");
83
+ let s = 0, o = 0, a = 0;
84
+ for (let n = 0; n < e.length; ++n) {
85
+ const i = e[n], l = t[n];
86
+ s += i * l, o += i * i, a += l * l;
87
+ }
88
+ const m = Math.sqrt(o * a);
89
+ if (m === 0)
90
+ return 0;
91
+ const r = s / m;
92
+ return Math.max(-1, Math.min(1, r));
93
+ }, Y = M, Z = P, ee = T, te = h, ae = p, se = V, oe = F, re = C, ne = N, ie = z, ce = H, me = O, le = () => R(), de = () => k(), ge = async (e, t) => await A(e, t), pe = async ({
94
+ modelTier: e = "default",
95
+ temperature: t = 0,
96
+ config: s
97
+ } = {}) => await x({ modelTier: e, temperature: t, config: s });
84
98
  export {
85
- re as ArcgisKnowledgeAgent,
86
- se as DataExplorationAgent,
87
- oe as HelpAgent,
88
- ae as LayerStylingAgent,
89
- te as NavigationAgent,
90
- ge as Orchestrator,
91
- ie as createAgentRuntimeState,
92
- ce as createAgentRuntimeStateWithSharedState,
93
- de as createChatModel,
94
- ne as createWebmapEmbeddings,
95
- ee as getEmbeddings,
96
- Q as invokeStructuredPrompt,
97
- J as invokeTextPrompt,
98
- Y as invokeToolPrompt,
99
- Z as sendTraceMessage,
100
- me as sendUXSuggestion
99
+ ce as ArcgisKnowledgeAgent,
100
+ ne as DataExplorationAgent,
101
+ ie as HelpAgent,
102
+ re as LayerStylingAgent,
103
+ oe as NavigationAgent,
104
+ ue as Orchestrator,
105
+ se as cosineSimilarity,
106
+ le as createAgentRuntimeState,
107
+ de as createAgentRuntimeStateWithSharedState,
108
+ pe as createChatModel,
109
+ me as createWebmapEmbeddings,
110
+ ae as getEmbeddings,
111
+ Z as invokeStructuredPrompt,
112
+ Y as invokeTextPrompt,
113
+ ee as invokeToolPrompt,
114
+ te as sendTraceMessage,
115
+ ge as sendUXSuggestion
101
116
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/ai-components",
3
- "version": "5.2.0-next.6",
3
+ "version": "5.2.0-next.61",
4
4
  "description": "ArcGIS AI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -9,6 +9,7 @@
9
9
  "exports": {
10
10
  ".": "./dist/index.js",
11
11
  "./loader": "./dist/loader.js",
12
+ "./agent-utils/index.js": "./dist/agent-utils/index.js",
12
13
  "./agent-utils/BaseAgent.js": "./dist/agent-utils/BaseAgent.js",
13
14
  "./agent-utils/FunctionAgent.js": "./dist/agent-utils/FunctionAgent.js",
14
15
  "./agent-utils/LLMAgent.js": "./dist/agent-utils/LLMAgent.js",
@@ -39,21 +40,21 @@
39
40
  "license": "SEE LICENSE IN LICENSE.md",
40
41
  "dependencies": {
41
42
  "@esri/arcgis-html-sanitizer": "~4.1.0",
42
- "@langchain/core": "^1.1.39",
43
- "@langchain/langgraph": "^1.2.6",
44
- "@langchain/openai": "^1.4.3",
45
- "langchain": "^1.3.1",
43
+ "@langchain/core": "^1.2.1",
44
+ "@langchain/langgraph": "^1.4.7",
45
+ "@langchain/openai": "^1.5.3",
46
+ "langchain": "^1.5.2",
46
47
  "lit": "^3.3.0",
47
- "marked": "~18.0.4",
48
+ "marked": "~18.0.7",
48
49
  "tslib": "^2.8.1",
49
- "zod": "^4.3.6",
50
- "@arcgis/toolkit": "5.2.0-next.6",
51
- "@arcgis/lumina": "5.2.0-next.6"
50
+ "zod": "^4.4.3",
51
+ "@arcgis/toolkit": "5.2.0-next.61",
52
+ "@arcgis/lumina": "5.2.0-next.61"
52
53
  },
53
54
  "peerDependencies": {
54
- "@arcgis/core": "^5.1.0-next",
55
- "@esri/calcite-components": "^5.1.1-next.3",
56
- "@arcgis/map-components": "~5.2.0-next.6"
55
+ "@arcgis/core": "^5.2.0-next",
56
+ "@esri/calcite-components": "^5.1.1",
57
+ "@arcgis/map-components": "~5.2.0-next.61"
57
58
  },
58
59
  "css.customData": [
59
60
  "dist/docs/vscode.css-custom-data.json"
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{g as s,h as e,v as i,y as t}from"./OH64RMOR.js";import"./YIMNOUTF.js";var o=s`:host{display:contents}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.loading-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);padding:0 var(--calcite-spacing-sm)}.loading{display:flex;align-items:center;gap:var(--calcite-spacing-sm)}.text{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}.skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.skeleton-text{display:block;height:.95em;border-radius:var(--calcite-border-radius);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 1.2s ease-in-out infinite;width:85%}.skeleton-text:last-child{width:70%}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.skeleton-text{animation:none}}`,a=class extends i{constructor(){super(...arguments),this.loading=!1,this.loadingMessage=""}static{this.properties={loading:5,loadingMessage:1}}static{this.styles=o}render(){return this.loading?e`<arcgis-assistant-message footer-disabled><slot name=icon slot=icon><calcite-icon class="icon" icon=effects scale=s></calcite-icon></slot><slot name=content slot=content><div class="loading-container"><div class="loading"><calcite-loader label=loading inline></calcite-loader><div class="text">${this.loadingMessage}</div></div><div class="skeleton-block"><span class="skeleton-text"></span><span class="skeleton-text"></span></div></div></slot></arcgis-assistant-message>`:null}};t("arcgis-assistant-message-loading",a);export{a as ArcgisAssistantMessageLoading};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./JV4SI65E.js";export default $arcgis.t(([,,,,,{f:t}])=>{var y=async(o,r)=>{let i=o.tool_calls??[];if(i.length===0){await t({text:`LLM did not request any tool calls: ${String(o?.content)}`},r);return}await Promise.all(i.map(async a=>await t({text:`LLM invoked ${a.name} tool with arguments: ${JSON.stringify(a.args,null,2)}`},r)))};return y},"identity/IdentityManager","portal/Portal","core/reactiveUtils","layers/FeatureLayer","request",a)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as l}from"./H7422XUG.js";import"./MH5RPXHM.js";import"./OAVEHGB6.js";import{g as a,h as e,k as o,t as i,u as n,v as r,y as c}from"./OH64RMOR.js";import"./YIMNOUTF.js";export default $arcgis.t(([{watch:d}])=>{var g=a`.container{display:flex;align-items:center;width:100%;justify-content:space-between;gap:var(--calcite-spacing-xs)}.start,.end{display:flex;align-items:center;gap:var(--calcite-spacing-xs)}`,t=class extends r{constructor(){super(...arguments),this._messages=l({blocking:!0}),this._endRef=i(),this._showLog=!1,this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1}static{this.properties={_showLog:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,message:0}}static{this.styles=g}loaded(){this.manager.onLifecycle(()=>[d(()=>this._showLog,()=>this._scrollToEnd())])}_scrollToEnd(){requestAnimationFrame(()=>{this._endRef.value?.scrollIntoView({behavior:"smooth",block:"end"})})}_renderCopyButton(){return!this.message?.error&&this.copyEnabled?e`<calcite-action id=action-copy icon=copy-to-clipboard scale=s @click=${async()=>{try{let s=this.message?.content?.trim();s&&await navigator.clipboard.writeText(s)}catch(s){o("warn","assistant-message-footer","Failed to copy text to clipboard",{once:!0,detail:{error:s}})}}} text></calcite-action><calcite-tooltip reference-element=action-copy overlay-positioning=fixed placement=bottom><span>${this._messages.copyButtonLabel}</span></calcite-tooltip>`:null}_renderLogButton(){return this.message?.log?.length&&this.logEnabled?e`<calcite-action id=action-log icon=access-string-results scale=s @click=${()=>this._showLog=!this._showLog} .text=${this._messages.logButtonLabel} .active=${this._showLog}></calcite-action><calcite-tooltip reference-element=action-log overlay-positioning=fixed placement=bottom><span>${this._messages.logButtonLabel}</span></calcite-tooltip>`:null}_renderReadAloudButton(){return e`<arcgis-assistant-message-read-aloud .message=${this.message} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-read-aloud>`}_renderLog(){return e`<arcgis-assistant-message-log .log=${this.message?.log} .showLog=${this._showLog} .logEnabled=${this.logEnabled}></arcgis-assistant-message-log>`}_renderFeedback(){return e`<arcgis-assistant-message-feedback .message=${this.message} .feedbackEnabled=${this.feedbackEnabled}></arcgis-assistant-message-feedback>`}render(){return e`${this._renderLog()}<div class="container"><div class="start">${this._renderCopyButton()}${this._renderLogButton()}${this._renderReadAloudButton()}<slot name=footer-actions-start></slot></div><div class="end"><slot name=footer-actions-end></slot>${this._renderFeedback()}</div></div><div ${n(this._endRef)}></div>`}};c("arcgis-assistant-message-footer",t);return t},"core/reactiveUtils")