@arcgis/ai-components 5.2.0-next.4 → 5.2.0-next.40

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 (217) hide show
  1. package/dist/agent-utils/FunctionAgent.d.ts +2 -2
  2. package/dist/agent-utils/LLMAgent.d.ts +2 -2
  3. package/dist/agent-utils/LLMAgent.js +23 -22
  4. package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
  5. package/dist/agent-utils/index.d.ts +177 -0
  6. package/dist/agent-utils/index.js +167 -0
  7. package/dist/agent-utils/middlewares/trace.d.ts +2 -0
  8. package/dist/agent-utils/middlewares/trace.js +25 -33
  9. package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
  10. package/dist/agent-utils/types.d.ts +36 -7
  11. package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
  12. package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
  13. package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
  14. package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
  15. package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
  16. package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
  17. package/dist/cdn/37Q23IS4.js +2 -0
  18. package/dist/cdn/3OH4DXSY.js +2 -0
  19. package/dist/cdn/{AMP6IALT.js → 3UEKINYC.js} +1 -1
  20. package/dist/cdn/3Y5INO72.js +3 -0
  21. package/dist/cdn/434TAA3J.js +2 -0
  22. package/dist/cdn/4G5XCUE5.js +2 -0
  23. package/dist/cdn/5SW5CPQT.js +3 -0
  24. package/dist/cdn/5VTVHDQ5.js +2 -0
  25. package/dist/cdn/6G5DYYYU.js +2 -0
  26. package/dist/cdn/6JX2ACRF.js +2 -0
  27. package/dist/cdn/7YIRK2E3.js +2 -0
  28. package/dist/cdn/A4JLOAOH.js +2 -0
  29. package/dist/cdn/AFKLWPPM.js +2 -0
  30. package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
  31. package/dist/cdn/APFZY4PI.js +2 -0
  32. package/dist/cdn/B7YAMTIH.js +3 -0
  33. package/dist/cdn/BF2IYMM6.js +2 -0
  34. package/dist/cdn/{FL4W4VYN.js → BL273EGZ.js} +17 -1
  35. package/dist/cdn/BMGQJYTE.js +2 -0
  36. package/dist/cdn/BNJFXDJV.js +2 -0
  37. package/dist/cdn/BST5ZU46.js +2 -0
  38. package/dist/cdn/C7DSVDSP.js +6 -0
  39. package/dist/cdn/{5ZZGKP7N.js → CEKOEHB3.js} +1 -1
  40. package/dist/cdn/D664PQPF.js +2 -0
  41. package/dist/cdn/DMLRWHBA.js +2 -0
  42. package/dist/cdn/E54QF5FR.js +2 -0
  43. package/dist/cdn/EIPHHMWX.js +180 -0
  44. package/dist/cdn/F3VYFN2Q.js +2 -0
  45. package/dist/cdn/F5SUU35Z.js +2 -0
  46. package/dist/cdn/FNBXR5WD.js +2 -0
  47. package/dist/cdn/FQ5XLE4I.js +2 -0
  48. package/dist/cdn/FY7YTXS4.js +2 -0
  49. package/dist/cdn/{ZLXN7NMF.js → FYZATVB3.js} +10 -8
  50. package/dist/cdn/GPVY5GM6.js +14 -0
  51. package/dist/cdn/{H7422XUG.js → GYVSHAUI.js} +1 -1
  52. package/dist/cdn/HBUW4KGU.js +36 -0
  53. package/dist/cdn/HJG7QM2R.js +9 -0
  54. package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
  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/JEL5M7FA.js +2 -0
  59. package/dist/cdn/JMODFBN6.js +48 -0
  60. package/dist/cdn/JVYPIWEU.js +2 -0
  61. package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
  62. package/dist/cdn/LUY6V4TP.js +181 -0
  63. package/dist/cdn/M2DEBF5S.js +2 -0
  64. package/dist/cdn/M3MRIGDZ.js +2 -0
  65. package/dist/cdn/MHMBHWYX.js +2 -0
  66. package/dist/cdn/MMRRNKWJ.js +2 -0
  67. package/dist/cdn/MS5EA2KY.js +2 -0
  68. package/dist/cdn/MWYBF3F3.js +66 -0
  69. package/dist/cdn/NAKAZDJ7.js +4 -0
  70. package/dist/cdn/NEV6OZN3.js +71 -0
  71. package/dist/cdn/OGMMYFHR.js +2 -0
  72. package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
  73. package/dist/cdn/OYNIFMCJ.js +2 -0
  74. package/dist/cdn/PBTINZTK.js +65 -0
  75. package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
  76. package/dist/cdn/PRN4OPLW.js +2 -0
  77. package/dist/cdn/R74ZHFA6.js +2 -0
  78. package/dist/cdn/RLEHNAIA.js +2 -0
  79. package/dist/cdn/SBP6WNDY.js +2 -0
  80. package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
  81. package/dist/cdn/SJR4IR57.js +2 -0
  82. package/dist/cdn/SKXDXIQO.js +22 -0
  83. package/dist/cdn/SPVOBZAL.js +2 -0
  84. package/dist/cdn/SYEI4BB2.js +56 -0
  85. package/dist/cdn/TI7K3I3K.js +18 -0
  86. package/dist/cdn/TPULIO6I.js +34 -0
  87. package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
  88. package/dist/cdn/UK7PR2FE.js +2 -0
  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/VXFQANGJ.js +2 -0
  93. package/dist/cdn/WSGWTIAV.js +9 -0
  94. package/dist/cdn/{4HU7735A.js → XFL2VQFM.js} +6 -4
  95. package/dist/cdn/XNWCRFTJ.js +2 -0
  96. package/dist/cdn/YYSMCB4A.js +2 -0
  97. package/dist/cdn/ZB57WYHC.js +2 -0
  98. package/dist/cdn/ZQ7PGNWB.js +208 -0
  99. package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
  100. package/dist/cdn/agent-utils/index.js +2 -0
  101. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +3 -0
  102. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -0
  103. package/dist/cdn/agent-utils/middlewares/trace.js +2 -0
  104. package/dist/cdn/index.js +1 -1
  105. package/dist/cdn/main.css +1 -1
  106. package/dist/chunks/adapter.js +1794 -1597
  107. package/dist/chunks/arcgisKnowledgeGraph.js +126 -71
  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 +139 -113
  114. package/dist/chunks/data_explore_query_prompt.js +9 -4
  115. package/dist/chunks/generateLayerDescriptions.js +231 -191
  116. package/dist/chunks/helpGraph.js +17 -13
  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 +24 -20
  121. package/dist/chunks/navigationGraph.js +33 -28
  122. package/dist/chunks/navigation_intent_prompt.js +8 -2
  123. package/dist/chunks/orchestrator.js +267 -226
  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 +12 -9
  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 +385 -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 +8 -2
  135. package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
  136. package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +4 -1
  137. package/dist/components/arcgis-assistant-chat-entry/customElement.js +25 -18
  138. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +11 -5
  139. package/dist/components/arcgis-assistant-help-agent/customElement.js +8 -2
  140. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -1
  141. package/dist/components/arcgis-assistant-interrupt/customElement.js +12 -8
  142. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +20 -0
  143. package/dist/components/arcgis-assistant-interrupt-preview/index.js +2 -0
  144. package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
  145. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +17 -11
  146. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +10 -4
  147. package/dist/components/arcgis-assistant-message/customElement.d.ts +23 -0
  148. package/dist/components/arcgis-assistant-message/customElement.js +28 -26
  149. package/dist/components/arcgis-assistant-message/index.d.ts +1 -0
  150. package/dist/components/arcgis-assistant-message/index.js +2 -0
  151. package/dist/components/arcgis-assistant-message-block/customElement.d.ts +1 -1
  152. package/dist/components/arcgis-assistant-message-block/customElement.js +18 -11
  153. package/dist/components/arcgis-assistant-message-block/index.js +1 -0
  154. package/dist/components/arcgis-assistant-message-feedback/customElement.d.ts +4 -1
  155. package/dist/components/arcgis-assistant-message-footer/customElement.d.ts +4 -1
  156. package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +8 -1
  157. package/dist/components/arcgis-assistant-message-loading/customElement.js +8 -8
  158. package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
  159. package/dist/components/arcgis-assistant-message-log/customElement.d.ts +4 -1
  160. package/dist/components/arcgis-assistant-message-read-aloud/customElement.d.ts +4 -1
  161. package/dist/components/arcgis-assistant-message-text/customElement.d.ts +5 -1
  162. package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
  163. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +11 -5
  164. package/dist/components/arcgis-assistant-speech-input/customElement.d.ts +6 -1
  165. package/dist/components/arcgis-assistant-suggested-prompts/customElement.d.ts +4 -1
  166. package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +8 -8
  167. package/dist/components/arcgis-assistant-user-message/customElement.d.ts +4 -1
  168. package/dist/components/arcgis-assistant-user-message/customElement.js +10 -8
  169. package/dist/docs/api.json +1 -1
  170. package/dist/docs/docs.json +1 -1
  171. package/dist/docs/vscode.html-custom-data.json +1 -1
  172. package/dist/docs/web-types.json +1 -1
  173. package/dist/index.d.ts +4 -0
  174. package/dist/loader.js +7 -6
  175. package/dist/types/lumina.d.ts +11 -5
  176. package/dist/types/preact.d.ts +12 -5
  177. package/dist/types/react.d.ts +13 -5
  178. package/dist/types/stencil.d.ts +11 -5
  179. package/dist/utils/index.d.ts +85 -42
  180. package/dist/utils/index.js +54 -49
  181. package/package.json +13 -12
  182. package/dist/cdn/2AXF774U.js +0 -2
  183. package/dist/cdn/3PKJWIC3.js +0 -2
  184. package/dist/cdn/462JBSEV.js +0 -422
  185. package/dist/cdn/5QAHYX7Y.js +0 -5
  186. package/dist/cdn/7BCR6TUO.js +0 -2
  187. package/dist/cdn/7GH7VSB2.js +0 -2
  188. package/dist/cdn/7PLV4QH6.js +0 -2
  189. package/dist/cdn/AO7BQHKC.js +0 -2
  190. package/dist/cdn/AXDZBBNL.js +0 -45
  191. package/dist/cdn/DDLZOMUY.js +0 -2
  192. package/dist/cdn/DHOVCT6R.js +0 -2
  193. package/dist/cdn/F2AHA4GB.js +0 -54
  194. package/dist/cdn/FHVXO2WG.js +0 -166
  195. package/dist/cdn/FX5JFRDL.js +0 -2
  196. package/dist/cdn/GSEPHN3A.js +0 -106
  197. package/dist/cdn/HB5A5R2E.js +0 -2
  198. package/dist/cdn/JY6LLOUJ.js +0 -22
  199. package/dist/cdn/KMQ3SP4I.js +0 -5
  200. package/dist/cdn/MDVYQQUG.js +0 -14
  201. package/dist/cdn/MH5RPXHM.js +0 -2
  202. package/dist/cdn/NAUXSHIE.js +0 -72
  203. package/dist/cdn/NVI3I46B.js +0 -2
  204. package/dist/cdn/OAVEHGB6.js +0 -2
  205. package/dist/cdn/OH64RMOR.js +0 -4
  206. package/dist/cdn/ON2V5XI2.js +0 -3
  207. package/dist/cdn/P6OPJQMC.js +0 -3
  208. package/dist/cdn/QR54T33D.js +0 -2
  209. package/dist/cdn/RVOAPUBN.js +0 -2
  210. package/dist/cdn/S6W6HV4T.js +0 -36
  211. package/dist/cdn/SXDLXCIM.js +0 -2
  212. package/dist/cdn/USMDJUFS.js +0 -2
  213. package/dist/cdn/V2P4AIGG.js +0 -2
  214. package/dist/cdn/V5YEZSRY.js +0 -16
  215. package/dist/cdn/Y333DGV6.js +0 -2
  216. package/dist/cdn/YIMNOUTF.js +0 -2
  217. package/dist/cdn/YY2SBO3V.js +0 -2
@@ -0,0 +1,99 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"./UZLQALHY.js";var e=`# ArcGIS Knowledge Graph Cypher Rules
3
+
4
+ ## GOAL
5
+
6
+ Generate a Cypher query that answers the user\u2019s request and conforms to the data model.
7
+
8
+ ---
9
+
10
+ ## 1. USER OVERRIDES (HIGHEST PRIORITY)
11
+
12
+ If the user specifies any of the following, ALWAYS follow their instructions over defaults:
13
+
14
+ - LIMIT (or no limit)
15
+ - Output columns / data model
16
+ - Inclusion/exclusion of globalid
17
+ - Ordering, grouping, filtering, projection
18
+
19
+ ---
20
+
21
+ ## 2. DATA MODEL CONFORMANCE (NON-NEGOTIABLE)
22
+
23
+ Use ONLY valid data model elements.
24
+
25
+ ### Required
26
+
27
+ - Use only valid entity types, relationship types, and properties
28
+ - Ensure relationships connect valid entity types
29
+ - infer direction from user prompt. if not clear use the least restrictive valid form supported by the model.
30
+
31
+ ### VALIDATION RULES (STRICT)
32
+
33
+ - Enforce exact schema match: all entities, relationships, and properties must exist exactly in the data model
34
+ - Validate relationship integrity: types, source\u2192target pairing, and direction must match schema
35
+ - Enforce field correctness: properties and filters must exist on the referenced type and use valid data types
36
+ - Ensure alias consistency: each alias maps to one type only and cannot change meaning
37
+ - Apply strict failure: if any component is invalid, do NOT generate the query and do NOT infer or repair
38
+
39
+ ## 4. PATH RESOLUTION
40
+
41
+ - First attempt a direct relationship
42
+ - If none exists \u2192 use a valid multi-hop path
43
+ - Each hop MUST be valid in the data model
44
+ - Max path length: 3 (unless user requests more)
45
+
46
+ ### Path selection
47
+
48
+ - Prefer shortest valid path
49
+ - If multiple valid paths exist \u2192 choose best match to user intent
50
+ - If no valid path exists \u2192 do not speculate
51
+
52
+ ---
53
+
54
+ ## 5. PERFORMANCE
55
+
56
+ - Use the minimal number of entities and relationships
57
+ - Prefer shortest valid path
58
+ - Avoid unnecessary patterns or complexity
59
+
60
+ ---
61
+
62
+ ## 6. CYPHER RULES
63
+
64
+ - UNION queries must return identical columns
65
+ - Apply LIMIT only after UNION (not inside subqueries)
66
+ - Do NOT use: OVER, REDUCE()
67
+ - Do NOT use reserved keywords as variables (call, match, return, as etc.)
68
+ - Use only valid openCypher syntax
69
+ - After OPTIONAL MATCH, always add:
70
+ WITH ...
71
+ WHERE var IS NOT NULL
72
+ before using var in any MATCH or relationship pattern.
73
+
74
+ ---
75
+
76
+ ## 7. SPATIAL RULES
77
+
78
+ - Prefer graph relationships over spatial functions
79
+ - Use spatial functions only when necessary
80
+ - Always ensure geometry is not null if using spatial functions
81
+ - for example: WHERE n.shape IS NOT NULL
82
+
83
+ ---
84
+
85
+ ## 9. DEFAULT OUTPUT (IF NOT SPECIFIED)
86
+
87
+ - Add LIMIT 50 unless results are clearly small
88
+ - Use descriptive aliases with AS
89
+ - ALWAYS Return full entities and relationships unless user requests specific properties
90
+
91
+ ---
92
+
93
+ ## 11. OUTPUT FORMAT
94
+
95
+ - Valid \u2192 return ONLY Cypher query
96
+ - No explanation
97
+
98
+ ---
99
+ `;export{e as default};
@@ -0,0 +1,22 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"./UZLQALHY.js";var e=`## Membership Bind Parameters
3
+
4
+ The current link chart contains a subset of entities and relationships from the database. Their membership is available to Cypher queries as lists of string identifiers through these bind parameters:
5
+
6
+ - $entityIds
7
+ - $relationshipIds
8
+
9
+ If, and ONLY if, the user is asking for data to be limited by the records already on 'the current link chart', 'my link chart', or similar, the generated Cypher should filter using these parameters.
10
+
11
+ ### START EXAMPLES
12
+
13
+ User request: 'Add all records that are connected to people on this link chart to the link chart'
14
+ Context: 'Person' entity in data model.
15
+ Expected Result: MATCH (n:Person)-[r]->(m) WHERE id(n) IN $entityIds return r, m
16
+
17
+ User request: 'Add all the suppliers to the link chart'
18
+ Context: 'Supplier' entity in the data model.
19
+ Expected Result: MATCH (s:Supplier) RETURN s
20
+
21
+ ### END EXAMPLES
22
+ `;export{e as default};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`## Navigation Agent - Tool Intent Classifier
2
+ import"./UZLQALHY.js";var e=`## Navigation Agent - Tool Intent Classifier
3
3
 
4
4
  You are an assistant that classifies the assigned task intent for navigation agent.
5
5
 
@@ -36,8 +36,14 @@ This is the order of preference in case of overlap:
36
36
 
37
37
  For example, "Where is Yosemite National Park". This is an address, but:
38
38
  A map that contains a bookmark with Yosemite National Park should prefer the bookmark.
39
- A map that has the National Parks layer, for example, should prefer the feature.
40
- If these do not exist, geocode and go to that address.
39
+ If bookmark does not exist, a map that has the National Parks layer, for example, should prefer the feature.
40
+ If both of these do not exist, geocode and go to that address.
41
+
42
+ Additional mapping guidance:
43
+
44
+ - "zoom/go to [layer]" with no filter \u2192 prefer \`goToLayer\`.
45
+ - "zoom/go to [features] where/with ..." (has a condition/filter) \u2192 prefer \`goToFeatures\`.
46
+ - Explicit numeric zoom/scale/viewpoint requests \u2192 prefer the matching zoom/scale/viewpoint tool.
41
47
 
42
48
  Return the name of the tool as a string.
43
49
  `;export{e as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as o}from"./GYVSHAUI.js";import"./F5SUU35Z.js";import"./RLEHNAIA.js";import{g as a,h as e,n as i,v as c,z as n}from"./NAKAZDJ7.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var r=a`.actions{display:flex;flex-direction:row;gap:var(--calcite-spacing-xs)}`,t=class extends c{constructor(){super(...arguments),this._messages=o({blocking:!0}),this.feedbackEnabled=!1,this.arcgisFeedback=i()}static{this.properties={feedbackEnabled:5,message:0}}static{this.styles=r}_handleFeedback(s){this.message&&(this.message.feedback=this.message.feedback?.positive===s?void 0:{positive:s},this.arcgisFeedback.emit(this.message),this.requestUpdate())}_getFeedback(){return this.message?.feedback?.positive}_renderThumbsUpButton(){return e`<calcite-action id=action-thumbs-up icon=thumbs-up scale=s .active=${this._getFeedback()===!0} @click=${()=>this._handleFeedback(!0)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-up overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsUpLabel}</span></calcite-tooltip>`}_renderThumbsDownButton(){return e`<calcite-action id=action-thumbs-down icon=thumbs-down scale=s .active=${this._getFeedback()===!1} @click=${()=>this._handleFeedback(!1)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-down overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsDownLabel}</span></calcite-tooltip>`}render(){return this.feedbackEnabled&&!this.message?.error?e`<div class="actions">${this._renderThumbsUpButton()}${this._renderThumbsDownButton()}</div>`:null}};n("arcgis-assistant-message-feedback",t);export{t as ArcgisAssistantMessageFeedback};