@arcgis/ai-components 5.0.0-next.133

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 (126) hide show
  1. package/LICENSE.md +17 -0
  2. package/README.md +11 -0
  3. package/dist/cdn/2KGO3SIH.js +4 -0
  4. package/dist/cdn/2OKOKVH3.js +4 -0
  5. package/dist/cdn/46CNQJRX.js +4 -0
  6. package/dist/cdn/7QPPUNQ3.js +4 -0
  7. package/dist/cdn/A3UHOE4Q.js +30 -0
  8. package/dist/cdn/A7BGJLHS.js +204 -0
  9. package/dist/cdn/AB32PU6M.js +4 -0
  10. package/dist/cdn/AD7WB3RO.js +4 -0
  11. package/dist/cdn/ASKBAWPQ.js +27 -0
  12. package/dist/cdn/BCCDWQP4.js +4 -0
  13. package/dist/cdn/CF42OIDB.js +4 -0
  14. package/dist/cdn/CGGGHCIN.js +4 -0
  15. package/dist/cdn/EJW7PCMD.js +4 -0
  16. package/dist/cdn/FORRN75L.js +4 -0
  17. package/dist/cdn/FYKWTA6C.js +58 -0
  18. package/dist/cdn/G7XEFTIR.js +4 -0
  19. package/dist/cdn/GRXZ64LO.js +20 -0
  20. package/dist/cdn/GZUY3255.js +61 -0
  21. package/dist/cdn/HPGCDT6I.js +4 -0
  22. package/dist/cdn/ID5STKZH.js +90 -0
  23. package/dist/cdn/J62NTCLN.js +4 -0
  24. package/dist/cdn/KMV7W5OL.js +4 -0
  25. package/dist/cdn/LILVLE37.js +87 -0
  26. package/dist/cdn/MXHQFIP3.js +19 -0
  27. package/dist/cdn/N4CYINOF.js +6 -0
  28. package/dist/cdn/NR6PK4OK.js +4 -0
  29. package/dist/cdn/PA2KCYKL.js +71 -0
  30. package/dist/cdn/PEFKT7JJ.js +4 -0
  31. package/dist/cdn/Q34AELDL.js +4 -0
  32. package/dist/cdn/Q3MKHRXI.js +4 -0
  33. package/dist/cdn/QIU4T2DV.js +4 -0
  34. package/dist/cdn/TCNLHL43.js +79 -0
  35. package/dist/cdn/UC4HPCM3.js +19 -0
  36. package/dist/cdn/UIUJKONY.js +4 -0
  37. package/dist/cdn/USJ5YVZN.js +16 -0
  38. package/dist/cdn/W4LEGPD2.js +111 -0
  39. package/dist/cdn/WOP5ENGJ.js +134 -0
  40. package/dist/cdn/YXLN5DSL.js +6 -0
  41. package/dist/cdn/ZQEX3TGK.js +17 -0
  42. package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -0
  43. package/dist/cdn/assets/assistant-chat-card/t9n/messages.en.json +1 -0
  44. package/dist/cdn/assets/assistant-chat-entry/t9n/messages.en.json +1 -0
  45. package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -0
  46. package/dist/cdn/assets/assistant-shell/t9n/messages.en.json +1 -0
  47. package/dist/cdn/index.js +4 -0
  48. package/dist/cdn/main.css +1 -0
  49. package/dist/chunks/runtime.js +17 -0
  50. package/dist/chunks/useT9n.js +9 -0
  51. package/dist/chunks/utils.js +35 -0
  52. package/dist/chunks/utils2.js +9 -0
  53. package/dist/components/arcgis-assistant/customElement.d.ts +14 -0
  54. package/dist/components/arcgis-assistant/customElement.js +250 -0
  55. package/dist/components/arcgis-assistant/index.d.ts +5 -0
  56. package/dist/components/arcgis-assistant/index.js +5 -0
  57. package/dist/components/arcgis-assistant/support/OrchestratorController.d.ts +33 -0
  58. package/dist/components/arcgis-assistant/support/utils.d.ts +1 -0
  59. package/dist/components/arcgis-assistant-agent/customElement.d.ts +10 -0
  60. package/dist/components/arcgis-assistant-agent/customElement.js +21 -0
  61. package/dist/components/arcgis-assistant-agent/index.d.ts +1 -0
  62. package/dist/components/arcgis-assistant-agent/index.js +1 -0
  63. package/dist/components/arcgis-assistant-chat/customElement.d.ts +17 -0
  64. package/dist/components/arcgis-assistant-chat/customElement.js +47 -0
  65. package/dist/components/arcgis-assistant-chat/index.d.ts +2 -0
  66. package/dist/components/arcgis-assistant-chat/index.js +2 -0
  67. package/dist/components/arcgis-assistant-chat-card/customElement.d.ts +18 -0
  68. package/dist/components/arcgis-assistant-chat-card/customElement.js +55 -0
  69. package/dist/components/arcgis-assistant-chat-card/index.d.ts +6 -0
  70. package/dist/components/arcgis-assistant-chat-card/index.js +6 -0
  71. package/dist/components/arcgis-assistant-chat-card-content/customElement.d.ts +11 -0
  72. package/dist/components/arcgis-assistant-chat-card-content/customElement.js +42 -0
  73. package/dist/components/arcgis-assistant-chat-card-content/index.d.ts +2 -0
  74. package/dist/components/arcgis-assistant-chat-card-content/index.js +2 -0
  75. package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +19 -0
  76. package/dist/components/arcgis-assistant-chat-entry/customElement.js +46 -0
  77. package/dist/components/arcgis-assistant-chat-entry/index.d.ts +4 -0
  78. package/dist/components/arcgis-assistant-chat-entry/index.js +4 -0
  79. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.d.ts +7 -0
  80. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +28 -0
  81. package/dist/components/arcgis-assistant-data-exploration-agent/index.d.ts +1 -0
  82. package/dist/components/arcgis-assistant-data-exploration-agent/index.js +1 -0
  83. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +14 -0
  84. package/dist/components/arcgis-assistant-interrupt/customElement.js +39 -0
  85. package/dist/components/arcgis-assistant-interrupt/index.d.ts +6 -0
  86. package/dist/components/arcgis-assistant-interrupt/index.js +6 -0
  87. package/dist/components/arcgis-assistant-layer-filter-agent/customElement.d.ts +7 -0
  88. package/dist/components/arcgis-assistant-layer-filter-agent/customElement.js +28 -0
  89. package/dist/components/arcgis-assistant-layer-filter-agent/index.d.ts +1 -0
  90. package/dist/components/arcgis-assistant-layer-filter-agent/index.js +1 -0
  91. package/dist/components/arcgis-assistant-layer-query-agent/customElement.d.ts +7 -0
  92. package/dist/components/arcgis-assistant-layer-query-agent/customElement.js +28 -0
  93. package/dist/components/arcgis-assistant-layer-query-agent/index.d.ts +1 -0
  94. package/dist/components/arcgis-assistant-layer-query-agent/index.js +1 -0
  95. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.d.ts +7 -0
  96. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +28 -0
  97. package/dist/components/arcgis-assistant-layer-styling-agent/index.d.ts +1 -0
  98. package/dist/components/arcgis-assistant-layer-styling-agent/index.js +1 -0
  99. package/dist/components/arcgis-assistant-navigation-agent/customElement.d.ts +7 -0
  100. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +28 -0
  101. package/dist/components/arcgis-assistant-navigation-agent/index.d.ts +1 -0
  102. package/dist/components/arcgis-assistant-navigation-agent/index.js +1 -0
  103. package/dist/components/arcgis-assistant-shell/customElement.d.ts +25 -0
  104. package/dist/components/arcgis-assistant-shell/customElement.js +29 -0
  105. package/dist/components/arcgis-assistant-shell/index.d.ts +6 -0
  106. package/dist/components/arcgis-assistant-shell/index.js +6 -0
  107. package/dist/components/assistant/assistant-agents/support/utils.d.ts +14 -0
  108. package/dist/controllers/useT9n.d.ts +1 -0
  109. package/dist/customAgents/AddAgent/AddAgent.d.ts +2 -0
  110. package/dist/docs/api.json +2239 -0
  111. package/dist/docs/docs.json +2011 -0
  112. package/dist/docs/vscode.css-custom-data.json +6 -0
  113. package/dist/docs/vscode.html-custom-data.json +306 -0
  114. package/dist/docs/web-types.json +693 -0
  115. package/dist/index.d.ts +99 -0
  116. package/dist/index.js +8 -0
  117. package/dist/loader.d.ts +2 -0
  118. package/dist/loader.js +23 -0
  119. package/dist/oauth-callback.html +31 -0
  120. package/dist/runtime.d.ts +6 -0
  121. package/dist/types/components.d.ts +2 -0
  122. package/dist/types/lumina.d.ts +80 -0
  123. package/dist/types/preact.d.ts +98 -0
  124. package/dist/types/react.d.ts +119 -0
  125. package/dist/types/stencil.d.ts +87 -0
  126. package/package.json +47 -0
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import{a as o}from"./2KGO3SIH.js";import"./UIUJKONY.js";import{g as a,h as t,k as e,p as n,t as l}from"./YXLN5DSL.js";import"./46CNQJRX.js";var r=a`.assistant-shell__footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.assistant-shell__content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative}.assistant-shell__suggested-prompts-container{position:absolute;bottom:0;display:flex;justify-content:center;width:100%}.assistant-shell__suggested-prompts{padding:var(--calcite-spacing-md)}.assistant-shell__suggested-prompt{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal}`,i=class extends n{constructor(){super(...arguments),this._messages=o({blocking:!0}),this.description="",this.loading=!1,this.entryMessageClosed=!1,this.awaitingResponse=!1,this.suggestedPrompts=[],this.inputValue="",this.arcgisCancel=e(),this.arcgisSubmit=e()}static{this.properties={heading:1,description:1,loading:5,entryMessage:1,entryMessageClosed:5,awaitingResponse:5,suggestedPrompts:0,inputValue:1,status:1}}static{this.styles=r}_renderSuggestedPrompts(){return this.suggestedPrompts?.length?t`<div class="assistant-shell__suggested-prompts-container"><calcite-chip-group class="assistant-shell__suggested-prompts" .label=${this._messages.suggestedPromptsLabel??"suggested prompts"} selection-mode=single-persist @calciteChipGroupSelect=${s=>this.inputValue=s.target.selectedItems[0]?.value??""}>${this.suggestedPrompts.map(s=>t`<calcite-chip closable .value=${s} .label=${s} appearance=outline-fill kind=brand><div class="assistant-shell__suggested-prompt">${s}</div></calcite-chip>`)}</calcite-chip-group></div>`:null}render(){return t`<calcite-panel .loading=${this.loading} .heading=${this.heading??this._messages.shellHeading} .description=${this.description}><slot slot=header-actions-end name=header-actions-end></slot><div class="assistant-shell__content-container"><slot></slot>${this._renderSuggestedPrompts()}</div><div class="assistant-shell__footer-container" slot=footer><slot name=entry-message>${this.entryMessageClosed?null:t`<calcite-notice slot=entry-message .open=${!this.entryMessageClosed} kind=info closable icon width=full><div slot=message>${this.entryMessage??this._messages.shellEntryMessage}</div></calcite-notice>`}</slot><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse} .arcgisSubmit=${this.arcgisSubmit} .arcgisCancel=${this.arcgisCancel} .inputValue=${this.inputValue} .status=${this.status}><slot name=entry-actions-start slot=entry-actions-start></slot></arcgis-assistant-chat-entry><slot name=footer-content></slot></div></calcite-panel>`}};l("arcgis-assistant-shell",i);export{i as ArcgisAssistantShell};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import d from"./A7BGJLHS.js";import{a as s,b as a}from"./FORRN75L.js";import c from"./WOP5ENGJ.js";import"./PEFKT7JJ.js";import"./UIUJKONY.js";import{p as r,t as e}from"./YXLN5DSL.js";import b from"./ZQEX3TGK.js";import"./LILVLE37.js";import"./46CNQJRX.js";export default $arcgis.t(([,,{d:i}])=>{var t=class extends r{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-query-agent requires a mapView");return{mapView:this.#t}}async load(){this.#t=await s(this,"arcgis-assistant-layer-query-agent"),a(this)}};e("arcgis-assistant-layer-query-agent",t);return t},b,c,d)
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import{Zb as a}from"./LILVLE37.js";import"./46CNQJRX.js";export{a as PromptTemplate};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import{a as s}from"./PEFKT7JJ.js";import{b as o}from"./UIUJKONY.js";function i(e,t){let n=s(e.referenceElement);if(n)return n;let r=o(e.el,"arcgis-assistant"),a=s(r?.referenceElement);if(a)return a;throw new Error(`${t}: Reference element not found`)}async function m(e,t){let n=i(e,t);await n.componentOnReady();let r=n.view;if(!r)throw new Error(`${t}: Reference element does not have a view`);return await r.when(),r}function g(e){let t=o(e.el,"arcgis-assistant");if(t===void 0)throw new Error("arcgis-assistant-agent must be used within an arcgis-assistant element");t.register({agent:e.agent,getContext:()=>e.getContext?.()??e.context??{}})}export{m as a,g as b};
@@ -0,0 +1,58 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e=`This Feature Layer is part of a Feature Service. The Feature Layer contains various fields, each with its own name, type, and description.
5
+ 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.
6
+ The geometry type for this layer is {layerGeometryType}.
7
+
8
+ 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.
9
+
10
+ Field Descriptions:
11
+ {fieldInformation}
12
+
13
+ Your task is to :
14
+
15
+ - analyze the field descriptions to understand the data represented in the Feature Layer.
16
+ - Generate the following for the layer:
17
+ - a title: a concise title that accurately reflects the content and purpose of the feature service.
18
+ - a description: a detailed description of the feature layer
19
+
20
+ Consider the following aspects in your description:
21
+
22
+ - purpose of this feature layer
23
+ - types of data and geometric entities represented in the layer
24
+ - sources of the layer information and the geographic area covered
25
+ - potential applications and usefulness of the feature layer in the GIS world
26
+
27
+ 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.
28
+
29
+ Instructions while generating the title:
30
+
31
+ - Avoid using special characters in the title.
32
+ - Avoid using 'layer' in the title.
33
+ - Avoid using all uppercase letters in the title. Use title case instead.
34
+ - The title should not be too long.
35
+
36
+ You are given Feature Layer descriptions and title.
37
+
38
+ ## Existing layer details filled in by a human:
39
+
40
+ {existingLayerTitle}
41
+ {existingLayerSnippet}
42
+ {existingLayerDescription}
43
+
44
+ ## Instructions on how to use the information filled in by a human:
45
+
46
+ Remember humans may have more information about the item than just the field and layer descriptions.
47
+
48
+ - Use this information ONLY IF it helps you understand the item better.
49
+ - Use this information ONLY IF it helps you generate a better description and title.
50
+ - Use your knowledge from this information to compensate for any important information that is missing in the field and layer descriptions.
51
+
52
+ ## Instructions on what to avoid doing with the information filled in by a human:
53
+
54
+ - you must not use this information in your response as it is.
55
+ - you must not think of this information as the final version.
56
+ - you must not use this information to generate a response without analyzing it.
57
+ - you must not copy this information verbatim in your response.
58
+ `;export{e as default};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import d from"./A7BGJLHS.js";import{a as r,b as e}from"./FORRN75L.js";import c from"./WOP5ENGJ.js";import"./PEFKT7JJ.js";import"./UIUJKONY.js";import{p as a,t as s}from"./YXLN5DSL.js";import b from"./ZQEX3TGK.js";import"./LILVLE37.js";import"./46CNQJRX.js";export default $arcgis.t(([,,{b:i}])=>{var t=class extends a{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");return{mapView:this.#t}}async load(){this.#t=await r(this,"arcgis-assistant-data-exploration-agent"),e(this)}};s("arcgis-assistant-data-exploration-agent",t);return t},b,c,d)
@@ -0,0 +1,20 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e=`## GIS Feature Layer Intent Classifier
5
+
6
+ You are an assistant that classifies user intent in ArcGIS Online Map Viewer.
7
+
8
+ Return **up to {maxIntents} intents in the exact order they should be executed** for the user's request.
9
+ If none apply, return an **empty list** (no "none" label).
10
+
11
+ Choose only from registered agents. Input format will be: {{id: string, name: string, description: string}}[]
12
+ {registeredAgents}
13
+
14
+ Rules:
15
+
16
+ - Output 0\u2013{maxIntents} items, ordered for execution.
17
+ - Do **not** include any labels outside the list above.
18
+ - Do **not** include "none"; return an empty list instead when unrelated questions like labels, popups, etc.
19
+ - If none apply, return an empty array [].
20
+ `;export{e as default};
@@ -0,0 +1,61 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e=`# ArcGIS JavaScript SDK FeatureLayerView Query Assistant
5
+
6
+ You are a GIS assistant that generates query parameters for the ArcGIS JavaScript SDK FeatureLayerView \`queryFeatures()\` method.
7
+
8
+ Analyze the user's request and construct appropriate query parameters for each relevant layer. Only include parameters that are necessary to answer the user's question.
9
+
10
+ ## Layer and Field Information
11
+
12
+ In addition to field info, layer info with layerId, name, and description will also be provided.
13
+ It will be an array of multiple layers.
14
+
15
+ You are only allowed to use the field names listed under each layer. Do not invent or use any fields not listed.
16
+
17
+ {layerFieldInfo}
18
+
19
+ ## Critical Guard \u2014 Do NOT Hallucinate Fields
20
+
21
+ If the user asks for a filter that requires a field not present in the list above, do not invent the field and do not include it in where or outStatistics.
22
+
23
+ Instead:
24
+ If you can still answer something with the allowed fields, do so (for example: return an unfiltered count).
25
+ Otherwise, return a valid query with where: "1=1" and omit any unsupported filters entirely.
26
+ Never reference fields beyond those listed. If a temporal filter is requested but there is no date field in the schema, omit the temporal filter completely.
27
+
28
+ Validator: Before producing output, verify every field used in where, orderByFields, and outStatistics.onStatisticField exists in the listed fields. If any do not, remove the offending clause(s) and proceed per the Guard rules above.
29
+
30
+ ## Input
31
+
32
+ Use the most recent relevant user question from the chat history. The question will **not** be restated again here.
33
+
34
+ ### Mixed Questions
35
+
36
+ If a question has both aggregate and display components (e.g., "How many wells have depth > 100? Show them"):
37
+
38
+ - Focus ONLY on the aggregate part ("how many") for this query
39
+ - The visualization part ("show them") is handled by a separate system
40
+
41
+ ## SQL-92 Date/Time Syntax
42
+
43
+ User timezone: {userTimezone} ({userTimezoneOffset})
44
+
45
+ Database stores dates in UTC. Convert user's local time to UTC.
46
+
47
+ To convert: if offset is \`-08:00\`, add 8 hours. If \`-05:00\`, add 5 hours.
48
+
49
+ Format: \`TIMESTAMP 'YYYY-MM-DD HH:MM:SS'\`
50
+
51
+ ### NOTE:
52
+
53
+ If the user request includes no filter (where: 1=1) and the answer can be
54
+ derived from precomputed fieldStatistics, do NOT call a tool.
55
+ Instead, respond directly using the provided statistics.
56
+
57
+ ## Your Task
58
+
59
+ 1. Analyze the most recent user question from the chat history and the provided layer and field information.
60
+ 2. Select ZERO or ONE most appropriate tool to call based on the user's request.
61
+ `;export{e as default};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import a from"./ZQEX3TGK.js";import"./LILVLE37.js";import"./46CNQJRX.js";export default $arcgis.t(([{m:a,n:b}])=>{return{FewShotChatMessagePromptTemplate:b,FewShotPromptTemplate:a}},a)
@@ -0,0 +1,90 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e=`# ArcGIS JavaScript SDK FeatureLayerView Query Assistant
5
+
6
+ You are a GIS assistant that generates query parameters for the ArcGIS JavaScript SDK FeatureLayerView \`queryFeatures()\` method.
7
+
8
+ Analyze the user's request and construct appropriate query parameters for each relevant layer. Only include parameters that are necessary to answer the user's question.
9
+
10
+ ## Layer and Field Information
11
+
12
+ In addition to field info, layer info with layerId, name, and description will also be provided.
13
+ It will be an array of multiple layers.
14
+
15
+ You are only allowed to use the field names listed under each layer. Do not invent or use any fields not listed.
16
+
17
+ {layerFieldInfo}
18
+
19
+ ## Critical Guard \u2014 Do NOT Hallucinate Fields
20
+
21
+ If the user asks for a filter that requires a field not present in the list above, do not invent the field and do not include it.
22
+
23
+ Instead:
24
+ If you can still answer something with the allowed fields, do so (for example: return an unfiltered count).
25
+ Otherwise, return a valid query with where: "1=1" and omit any unsupported filters entirely.
26
+ Never reference fields beyond those listed. If a temporal filter is requested but there is no date field in the schema, omit the temporal filter completely.
27
+
28
+ Validator: Before producing output, verify every field used exists in the listed fields. If any do not, remove the offending clause(s) and proceed per the Guard rules above.
29
+
30
+ ## Input
31
+
32
+ Use the most recent relevant user question from the chat history. The question will **not** be restated again here. Start with a fresh WHERE clause for each question - do not inherit filters from previous questions unless user explicitly asks to combine them.
33
+
34
+ ### Mixed Questions
35
+
36
+ If a question has both aggregate and display components (e.g., "How many wells have depth > 100? Show them"):
37
+
38
+ - Focus ONLY on the aggregate part ("how many") for this query
39
+ - The visualization part ("show them") is handled by a separate system
40
+
41
+ ## RULES
42
+
43
+ DO NOT generate sub queries or nested queries as they are not supported by ArcGIS.
44
+
45
+ When dealing with geometry and proximity and spatial queries:
46
+
47
+ 1. TARGET LAYER = What you want to FIND/RETURN in results
48
+ 2. GEOMETRY LAYER = The location to search FROM (with distance buffer)
49
+
50
+ For questions like "Is [specific item A] near/within [any of type B]":
51
+
52
+ - Target: Type B (what we're searching for)
53
+ - Geometry: Specific item A (where we're searching from)
54
+
55
+ Examples:
56
+
57
+ Q: "Is well P132_1873 within 300m from a protected area?"
58
+ Target: Protected Areas (what we want to find)
59
+ Geometry: Well (where="ID = 'P132_1873'" - single point)
60
+ Result: Returns which protected areas are nearby
61
+
62
+ Q: "Find roads within 500m of park X"
63
+ Target: Roads (what we want to find)
64
+ Geometry: Park X (specific location)
65
+ Result: Returns which roads are nearby
66
+
67
+ Key principle: The geometry layer should be the SIMPLER geometry (ideally a single feature or small set),
68
+ not a large collection that requires union operations.
69
+
70
+ ### NOTE:
71
+
72
+ If the user request includes no filter (where: 1=1) and the answer can be derived from precomputed fieldStatistics, do NOT call a tool. Instead, respond directly using the provided statistics.
73
+
74
+ If you cannot answer directly, you MUST call a tool.
75
+
76
+ ## SQL-92 Date/Time Syntax
77
+
78
+ User timezone: {userTimezone} ({userTimezoneOffset})
79
+
80
+ Database stores dates in UTC. Convert user's local time to UTC.
81
+
82
+ To convert: if offset is \`-08:00\`, add 8 hours. If \`-05:00\`, add 5 hours.
83
+
84
+ Format: \`TIMESTAMP 'YYYY-MM-DD HH:MM:SS'\`
85
+
86
+ ## Your Task
87
+
88
+ 1. Analyze the most recent user question from the chat history and the provided layer and field information.
89
+ 2. Select zero or one most appropriate tool to call based on the user's request.
90
+ `;export{e as default};