@arcgis/ai-components 5.2.0-next.71 → 5.2.0-next.73

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 (167) hide show
  1. package/LICENSE.md +4 -2
  2. package/dist/agent-utils/LLMAgent.d.ts +5 -2
  3. package/dist/agent-utils/LLMAgent.js +1 -1
  4. package/dist/agent-utils/types.d.ts +1 -1
  5. package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +24 -0
  6. package/dist/agentic-workflow/Edge.d.ts +16 -0
  7. package/dist/agentic-workflow/WebAgent.d.ts +39 -0
  8. package/dist/agentic-workflow/jsonTypes.d.ts +193 -0
  9. package/dist/agentic-workflow/nodes/AgentNode.d.ts +28 -0
  10. package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
  11. package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
  12. package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
  13. package/dist/agentic-workflow/nodes/support/Prompt.d.ts +20 -0
  14. package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
  15. package/dist/agentic-workflow/types.d.ts +29 -0
  16. package/dist/cdn/2EJROB32.js +2 -0
  17. package/dist/cdn/34O57OGV.js +2 -0
  18. package/dist/cdn/3LXXSMA5.js +2 -0
  19. package/dist/cdn/3MJQA533.js +2 -0
  20. package/dist/cdn/3U476GCP.js +5 -0
  21. package/dist/cdn/3XXZUQMQ.js +2 -0
  22. package/dist/cdn/4YDXYW4J.js +2 -0
  23. package/dist/cdn/4ZUUS4DH.js +2 -0
  24. package/dist/cdn/527C4GD2.js +36 -0
  25. package/dist/cdn/5RZGG4F2.js +2 -0
  26. package/dist/cdn/5SF6DEMO.js +2 -0
  27. package/dist/cdn/5Y6TQAJN.js +2 -0
  28. package/dist/cdn/65IWA2PM.js +2 -0
  29. package/dist/cdn/{MW5S2XCB.js → 67YCNNCN.js} +2 -2
  30. package/dist/cdn/6FKLWNGA.js +2 -0
  31. package/dist/cdn/6QJFOL6M.js +2 -0
  32. package/dist/cdn/6RDKDLSX.js +2 -0
  33. package/dist/cdn/6SGNSDLY.js +2 -0
  34. package/dist/cdn/7747YL7V.js +2 -0
  35. package/dist/cdn/7TO56JHS.js +2 -0
  36. package/dist/cdn/ABXLPDEK.js +2 -0
  37. package/dist/cdn/BBJDW6GC.js +2 -0
  38. package/dist/cdn/{PUFTYLJ2.js → C4FKFOU4.js} +4 -4
  39. package/dist/cdn/CCC6LBMY.js +2 -0
  40. package/dist/cdn/CGVVL52C.js +2 -0
  41. package/dist/cdn/DBHLKLKM.js +2 -0
  42. package/dist/cdn/DKLK4EUE.js +2 -0
  43. package/dist/cdn/E25RINU2.js +2 -0
  44. package/dist/cdn/E62P76TP.js +2 -0
  45. package/dist/cdn/E7JLG2A2.js +2 -0
  46. package/dist/cdn/{TFT6HK3O.js → E7KEOJZG.js} +1 -1
  47. package/dist/cdn/FDOMMK2M.js +2 -0
  48. package/dist/cdn/FSMHR7GK.js +2 -0
  49. package/dist/cdn/GG3AESSV.js +2 -0
  50. package/dist/cdn/H6JSNAT4.js +2 -0
  51. package/dist/cdn/HNMFFLSY.js +2 -0
  52. package/dist/cdn/HO2YDJI2.js +6 -0
  53. package/dist/cdn/{KQHLOYKL.js → I4L45WQS.js} +1 -1
  54. package/dist/cdn/ITBQGOMF.js +11 -0
  55. package/dist/cdn/JH6EAWB2.js +2 -0
  56. package/dist/cdn/JON2JHS2.js +2 -0
  57. package/dist/cdn/JWPB3XZM.js +2 -0
  58. package/dist/cdn/JXB4TNSG.js +2 -0
  59. package/dist/cdn/JYVBCHR6.js +6 -0
  60. package/dist/cdn/KRN6AFNB.js +18 -0
  61. package/dist/cdn/KZACIY2W.js +2 -0
  62. package/dist/cdn/MKJS7QYQ.js +2 -0
  63. package/dist/cdn/N735LT4S.js +2 -0
  64. package/dist/cdn/NP7DG7LQ.js +2 -0
  65. package/dist/cdn/NTZAOJH5.js +2 -0
  66. package/dist/cdn/{CXW5URTF.js → OHMNQ3RU.js} +5 -5
  67. package/dist/cdn/ONQ6JSBJ.js +2 -0
  68. package/dist/cdn/PAUIFUMO.js +2 -0
  69. package/dist/cdn/QNNGPA3Q.js +2 -0
  70. package/dist/cdn/RATZTLNX.js +2 -0
  71. package/dist/cdn/RU5DVLYG.js +156 -0
  72. package/dist/cdn/{YHQJ66WJ.js → S3XUYAUX.js} +1 -1
  73. package/dist/cdn/S6ZAQRC6.js +2 -0
  74. package/dist/cdn/SABZC4D4.js +2 -0
  75. package/dist/cdn/TYL5G7KR.js +2 -0
  76. package/dist/cdn/{XETNZW4D.js → UAZLKUFN.js} +1 -1
  77. package/dist/cdn/UZL6UVE4.js +2 -0
  78. package/dist/cdn/VBZ5XGAM.js +2 -0
  79. package/dist/cdn/VXBUMZYR.js +2 -0
  80. package/dist/cdn/W5FLNFSN.js +2 -0
  81. package/dist/cdn/W5J4Q3RO.js +14 -0
  82. package/dist/cdn/WQKNV6KK.js +2 -0
  83. package/dist/cdn/{ICYUPLZM.js → WZFC5HUX.js} +1 -1
  84. package/dist/cdn/XGBEHER5.js +2 -0
  85. package/dist/cdn/XPTCV6YV.js +2 -0
  86. package/dist/cdn/Y5UFOH54.js +2 -0
  87. package/dist/cdn/YGCTAIBS.js +2 -0
  88. package/dist/cdn/{SXHH575T.js → ZJEWP2ND.js} +20 -24
  89. package/dist/cdn/agent-utils/index.js +1 -1
  90. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +1 -1
  91. package/dist/cdn/agent-utils/middlewares/middleware.js +1 -1
  92. package/dist/cdn/agent-utils/middlewares/trace.js +1 -1
  93. package/dist/cdn/index.js +1 -1
  94. package/dist/chunks/adapter.js +939 -1950
  95. package/dist/chunks/adapter10.js +21 -0
  96. package/dist/chunks/adapter11.js +30 -0
  97. package/dist/chunks/adapter12.js +22 -0
  98. package/dist/chunks/adapter13.js +22 -0
  99. package/dist/chunks/adapter14.js +109 -0
  100. package/dist/chunks/adapter15.js +40 -0
  101. package/dist/chunks/adapter16.js +154 -0
  102. package/dist/chunks/adapter17.js +141 -0
  103. package/dist/chunks/adapter18.js +127 -0
  104. package/dist/chunks/adapter2.js +52 -0
  105. package/dist/chunks/adapter3.js +30 -0
  106. package/dist/chunks/adapter4.js +50 -0
  107. package/dist/chunks/adapter5.js +27 -0
  108. package/dist/chunks/adapter6.js +24 -0
  109. package/dist/chunks/adapter7.js +26 -0
  110. package/dist/chunks/adapter8.js +21 -0
  111. package/dist/chunks/adapter9.js +42 -0
  112. package/dist/chunks/arcgisKnowledgeGraph.js +5 -5
  113. package/dist/chunks/baseAgentState.js +56 -0
  114. package/dist/chunks/dataExplorationGraph.js +34 -31
  115. package/dist/chunks/fetchAgentContext.js +13 -0
  116. package/dist/chunks/fetchService.js +10 -0
  117. package/dist/chunks/formatFeatureAttributes.js +132 -0
  118. package/dist/chunks/generateLayerDescriptions.js +189 -235
  119. package/dist/chunks/helpGraph.js +11 -9
  120. package/dist/chunks/layerStylingGraph.js +22 -21
  121. package/dist/chunks/mergeWhereClauses.js +15 -0
  122. package/dist/chunks/navigationGraph.js +81 -70
  123. package/dist/chunks/orchestrator.js +1 -1
  124. package/dist/chunks/state.js +20 -26
  125. package/dist/chunks/types.js +59 -0
  126. package/dist/chunks/utils2.js +3 -3
  127. package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
  128. package/dist/components/arcgis-assistant-agent/customElement.js +636 -10
  129. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +15 -5
  130. package/dist/components/arcgis-assistant-help-agent/customElement.js +21 -5
  131. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +39 -22
  132. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +22 -5
  133. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +13 -5
  134. package/dist/docs/api.json +1 -1
  135. package/dist/docs/docs.json +1 -1
  136. package/dist/docs/vscode.html-custom-data.json +1 -1
  137. package/dist/docs/web-types.json +1 -1
  138. package/dist/loader.js +1 -1
  139. package/dist/types/lumina.d.ts +1 -1
  140. package/dist/types/preact.d.ts +1 -1
  141. package/dist/types/react.d.ts +1 -1
  142. package/dist/types/stencil.d.ts +1 -1
  143. package/dist/utils/index.js +26 -25
  144. package/package.json +4 -4
  145. package/dist/cdn/3DJDRAGV.js +0 -2
  146. package/dist/cdn/4CEMUECT.js +0 -2
  147. package/dist/cdn/4PCAK3ET.js +0 -2
  148. package/dist/cdn/57OMVTIU.js +0 -2
  149. package/dist/cdn/6U7TEAAJ.js +0 -2
  150. package/dist/cdn/BE7ZN5FZ.js +0 -2
  151. package/dist/cdn/BNSJO6X2.js +0 -2
  152. package/dist/cdn/CMDRED5H.js +0 -2
  153. package/dist/cdn/DTIVDIDY.js +0 -2
  154. package/dist/cdn/E5ZKBC24.js +0 -36
  155. package/dist/cdn/GP6NDTUE.js +0 -18
  156. package/dist/cdn/HBLRVXEB.js +0 -2
  157. package/dist/cdn/HQXPPYMD.js +0 -2
  158. package/dist/cdn/IEHPNCTL.js +0 -2
  159. package/dist/cdn/LHLO6PTD.js +0 -2
  160. package/dist/cdn/OWXCOUIQ.js +0 -2
  161. package/dist/cdn/PVE7Q43N.js +0 -2
  162. package/dist/cdn/ST5FQYT7.js +0 -180
  163. package/dist/cdn/WUNCZOGU.js +0 -2
  164. package/dist/cdn/WVPU4QOO.js +0 -2
  165. package/dist/cdn/WXWO5D3W.js +0 -2
  166. package/dist/cdn/XCRR2EEG.js +0 -6
  167. package/dist/cdn/ZS6SXJP2.js +0 -2
@@ -0,0 +1,59 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import m from "@arcgis/core/geometry/Point.js";
3
+ import * as y from "@arcgis/core/geometry/operators/unionOperator.js";
4
+ import f from "zod";
5
+ const u = 750;
6
+ function c(e) {
7
+ return "point" in e && e.point !== void 0;
8
+ }
9
+ function d(e) {
10
+ return "layerId" in e && e.layerId !== void 0;
11
+ }
12
+ const R = async (e, o) => {
13
+ if (c(e)) {
14
+ const { point: r } = e;
15
+ return { geometry: new m({
16
+ x: r.x,
17
+ y: r.y,
18
+ spatialReference: r.spatialReference ? { wkid: r.spatialReference.wkid } : o.spatialReference
19
+ }) };
20
+ }
21
+ if (d(e)) {
22
+ const r = o.map?.allLayers.find(
23
+ (t) => t.id === e.layerId
24
+ );
25
+ if (!r)
26
+ return { error: `Could not find geometry layer with ID: ${e.layerId}` };
27
+ const i = r.title ?? r.id, l = e.where?.trim() || "1=1";
28
+ try {
29
+ const t = await r.queryFeatures({
30
+ where: l,
31
+ returnGeometry: !0,
32
+ outSpatialReference: o.spatialReference,
33
+ num: u + 1
34
+ });
35
+ if (!t.features.length)
36
+ return {
37
+ error: `No features found in geometry layer "${i}" with the specified where clause: ${l}`
38
+ };
39
+ if (t.features.length > u)
40
+ return {
41
+ error: `Geometry filter for layer "${i}" matched too many features (${t.features.length}+). Please narrow the geometry layer filter.`
42
+ };
43
+ const a = t.features.map((s) => s.geometry).filter((s) => !!s);
44
+ if (!a.length)
45
+ return { error: "No valid geometries found for the matched geometry layer features." };
46
+ const n = a.length === 1 ? a[0] : y.executeMany(a);
47
+ return n ? (n.spatialReference || (n.spatialReference = o.spatialReference), { geometry: n }) : { error: "Failed to combine geometries from geometry layer." };
48
+ } catch (t) {
49
+ return { error: `Failed to query geometry: ${String(t)}` };
50
+ }
51
+ }
52
+ return { error: "Invalid geometry configuration provided" };
53
+ }, h = ["feet", "kilometers", "meters", "miles", "nautical-miles", "us-nautical-miles"], w = f.enum(h);
54
+ export {
55
+ c as a,
56
+ w as d,
57
+ R as g,
58
+ d as i
59
+ };
@@ -40,8 +40,8 @@ function v(e) {
40
40
  return t ? t.view : null;
41
41
  }
42
42
  export {
43
- g as a,
44
- v as b,
45
- w as i,
43
+ v as a,
44
+ w as b,
45
+ g as i,
46
46
  m as r
47
47
  };
@@ -1,6 +1,7 @@
1
1
  /// <reference path="../../index.d.ts" />
2
2
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
3
  import type { AgentRegistration } from "../../utils/index.js";
4
+ import type { AgenticWorkflowJson } from "../../agentic-workflow/jsonTypes.js";
4
5
 
5
6
  /**
6
7
  * The Assistant Agent component is a generic wrapper for registering custom agents to the [arcgis-assistant](https://developers.arcgis.com/javascript/latest/references/ai-components/components/arcgis-assistant/) component. To define
@@ -67,7 +68,6 @@ export abstract class ArcgisAssistantAgent<TContext = Record<string, unknown>> e
67
68
  * See the [Custom Agents guide](https://developers.arcgis.com/javascript/latest/agentic-apps/ai-custom-agents/) for more instructions
68
69
  * and links to samples demonstrating how to create custom agents.
69
70
  *
70
- * @required
71
71
  * @see [LangGraph documentation](https://docs.langchain.com/oss/javascript/langgraph/overview)
72
72
  * @see [Custom agents guide](https://developers.arcgis.com/javascript/latest/agentic-apps/ai-custom-agents/)
73
73
  * @example
@@ -138,4 +138,16 @@ export abstract class ArcgisAssistantAgent<TContext = Record<string, unknown>> e
138
138
  * ```
139
139
  */
140
140
  accessor context: TContext | (() => Promise<TContext | undefined> | TContext | undefined) | undefined;
141
+ /**
142
+ * The portal item ID associated with this assistant agent.
143
+ *
144
+ * @internal
145
+ */
146
+ accessor itemId: string | undefined;
147
+ /**
148
+ * The workflow JSON associated with this assistant agent.
149
+ *
150
+ * @internal
151
+ */
152
+ accessor workflow: AgenticWorkflowJson | undefined;
141
153
  }