@arcgis/ai-components 5.1.0-next.132 → 5.1.0-next.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-utils/LLMAgent.js +1 -0
- package/dist/cdn/{MGPLH2PO.js → 2K55LM7D.js} +2 -2
- package/dist/cdn/4EALV6QJ.js +2 -0
- package/dist/cdn/4YMVC2WQ.js +2 -0
- package/dist/cdn/{CKVNSPM3.js → 5RQUSM3T.js} +9 -4
- package/dist/cdn/{QXWL4WLO.js → 5TNWYXLO.js} +5 -5
- package/dist/cdn/{IFB2ASIW.js → 6BG6KRX4.js} +1 -1
- package/dist/cdn/{GNCV7JCL.js → 7WSTR3WA.js} +1 -1
- package/dist/cdn/A5BFXA66.js +2 -0
- package/dist/cdn/D2I7TZ3V.js +3 -0
- package/dist/cdn/DQML5GFC.js +16 -0
- package/dist/cdn/DZ5GEWTT.js +2 -0
- package/dist/cdn/E2FJS7ZW.js +2 -0
- package/dist/cdn/FJDGBPFY.js +2 -0
- package/dist/cdn/FWLEC33J.js +3 -0
- package/dist/cdn/{WRKGKKWT.js → HQJUEXND.js} +1 -1
- package/dist/cdn/JZ4W322Q.js +2 -0
- package/dist/cdn/{NKL6PVCN.js → MCQR5IEB.js} +1 -1
- package/dist/cdn/MMCPSWGL.js +2 -0
- package/dist/cdn/MXPGGYZ5.js +2 -0
- package/dist/cdn/P5VYRL3F.js +2 -0
- package/dist/cdn/{7HKOEG6B.js → PJFNIBRA.js} +3 -3
- package/dist/cdn/RHG5ENR3.js +2 -0
- package/dist/cdn/RXUGYIPT.js +2 -0
- package/dist/cdn/TCS3JLFM.js +2 -0
- package/dist/cdn/{SOCUKQVO.js → TRZURWLQ.js} +1 -1
- package/dist/cdn/TSI4RYTU.js +2 -0
- package/dist/cdn/UUC47SR5.js +2 -0
- package/dist/cdn/VEF7ZQXR.js +2 -0
- package/dist/cdn/WAKZBZN6.js +4 -0
- package/dist/cdn/WALWNGLA.js +2 -0
- package/dist/cdn/{3352JWU3.js → WAUIIVEJ.js} +1 -1
- package/dist/cdn/{DZWRIK64.js → YI2KPJBP.js} +18 -18
- package/dist/cdn/agent-utils/index.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/adapter.js +78 -77
- package/dist/chunks/arcgisKnowledgeGraph.js +8 -7
- package/dist/chunks/dataExplorationGraph.js +88 -76
- package/dist/chunks/data_explore_query_prompt.js +9 -4
- package/dist/chunks/generateLayerDescriptions.js +161 -159
- package/dist/chunks/helpGraph.js +3 -2
- package/dist/chunks/layerStylingGraph.js +1 -0
- package/dist/chunks/navigationGraph.js +3 -2
- package/dist/chunks/orchestrator.js +108 -107
- package/dist/chunks/toolCallResponse.js +10 -9
- package/dist/components/arcgis-assistant/customElement.js +136 -124
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +3 -2
- package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -0
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +4 -3
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -0
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/cdn/43BXVTTX.js +0 -3
- package/dist/cdn/45WQFXC6.js +0 -2
- package/dist/cdn/5BWAWCMA.js +0 -2
- package/dist/cdn/6HIZCLMG.js +0 -2
- package/dist/cdn/6MS2XN27.js +0 -2
- package/dist/cdn/COFOUGFJ.js +0 -4
- package/dist/cdn/CY2AOS7J.js +0 -2
- package/dist/cdn/DPCBYJAM.js +0 -2
- package/dist/cdn/DQIMHH5V.js +0 -2
- package/dist/cdn/DXWRFET6.js +0 -2
- package/dist/cdn/F2QU4HAK.js +0 -2
- package/dist/cdn/H4ENPGSI.js +0 -2
- package/dist/cdn/HFQQORS4.js +0 -2
- package/dist/cdn/HWSIV5DK.js +0 -2
- package/dist/cdn/I6AHJA2A.js +0 -16
- package/dist/cdn/IFDBNTW2.js +0 -3
- package/dist/cdn/MDZ3PTNT.js +0 -2
- package/dist/cdn/P7EGIU6K.js +0 -2
- package/dist/cdn/VVG5FDCY.js +0 -2
- package/dist/cdn/ZR5WU3UB.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import"../CFDTXKJ6.js";var a,o,i,c,u,s,w,f,l,m,p;async function r(n,t){if(t in n)return n[t];if("default"in n){let e=await n.default;return typeof e=="object"&&e!==null&&t in e?e[t]:e}throw new Error(`Unable to resolve ${String(t)} from module.`)}function k(n,t){let e={};for(let[y,d]of Object.entries(t))e[y]=b(n,d);return e}function W(n,t){return n.object(k(n,t))}function b(n,t){let e=g(n,t);return t.required===!0?e:e.optional()}function g(n,t){let e=A(n,t);return t.description!==void 0&&(e=e.describe(t.description)),e}function h(n,t){switch(t){case"string":return n.string();case"number":return n.number();case"boolean":return n.boolean()}}function A(n,t){switch(t.type){case"string":{if(t.enum!==void 0){if(t.enum.length===0)throw new Error("String schema field enum must include at least one value.");return n.enum(t.enum)}return n.string()}case"number":return n.number();case"boolean":return n.boolean();case"array":{if(t.itemType===void 0)throw new Error("Array schema field requires an itemType definition.");return n.array(h(n,t.itemType))}}}async function S(n){p??=import("../6FEB6XYK.js");let t=await p;return W(t.z,n)}async function L(n){a??=import("../DAMZY3V4.js");let t=await a,e=await r(t,"FunctionAgent");return new e(n)}async function v(n){o??=import("../VPZHLYPA.js");let t=await o,e=await r(t,"FunctionTool");return new e(n)}async function T(n){i??=import("../
|
|
2
|
+
import"../CFDTXKJ6.js";var a,o,i,c,u,s,w,f,l,m,p;async function r(n,t){if(t in n)return n[t];if("default"in n){let e=await n.default;return typeof e=="object"&&e!==null&&t in e?e[t]:e}throw new Error(`Unable to resolve ${String(t)} from module.`)}function k(n,t){let e={};for(let[y,d]of Object.entries(t))e[y]=b(n,d);return e}function W(n,t){return n.object(k(n,t))}function b(n,t){let e=g(n,t);return t.required===!0?e:e.optional()}function g(n,t){let e=A(n,t);return t.description!==void 0&&(e=e.describe(t.description)),e}function h(n,t){switch(t){case"string":return n.string();case"number":return n.number();case"boolean":return n.boolean()}}function A(n,t){switch(t.type){case"string":{if(t.enum!==void 0){if(t.enum.length===0)throw new Error("String schema field enum must include at least one value.");return n.enum(t.enum)}return n.string()}case"number":return n.number();case"boolean":return n.boolean();case"array":{if(t.itemType===void 0)throw new Error("Array schema field requires an itemType definition.");return n.array(h(n,t.itemType))}}}async function S(n){p??=import("../6FEB6XYK.js");let t=await p;return W(t.z,n)}async function L(n){a??=import("../DAMZY3V4.js");let t=await a,e=await r(t,"FunctionAgent");return new e(n)}async function v(n){o??=import("../VPZHLYPA.js");let t=await o,e=await r(t,"FunctionTool");return new e(n)}async function T(n){i??=import("../RHG5ENR3.js");let t=await i,e=await r(t,"LLMAgent");return new e(n)}async function q(n){c??=import("../RLWXD365.js");let t=await c,e=await r(t,"WorkflowAgent");return new e(n)}async function F(n){u??=import("../EY5GGKO5.js");let t=await u,e=await r(t,"ConditionalWorkflow");return new e(n)}async function j(n){s??=import("../UPSGN34Q.js");let t=await s,e=await r(t,"LoopWorkflow");return new e(n)}async function E(n){w??=import("../V746CPCO.js");let t=await w,e=await r(t,"ParallelWorkflow");return new e(n)}async function M(n){f??=import("../VWG4M6ZB.js");let t=await f,e=await r(t,"RouterWorkflow");return new e(n)}async function P(n){l??=import("../KJ5IHMRP.js");let t=await l,e=await r(t,"SequentialWorkflow");return new e(n)}async function R(n){m??=import("../ZL2D2BJI.js");let t=await m,e=await r(t,"SwitchWorkflow");return new e(n)}export{F as createConditionalWorkflow,L as createFunctionAgent,v as createFunctionTool,T as createLLMAgent,j as createLoopWorkflow,E as createParallelWorkflow,M as createRouterWorkflow,S as createSchema,P as createSequentialWorkflow,R as createSwitchWorkflow,q as createWorkflowAgent};
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{p as s,y as e}from"./
|
|
2
|
+
import{p as s,y as e}from"./WAKZBZN6.js";import"./4EALV6QJ.js";import"./CFDTXKJ6.js";var a=s(e,{"arcgis-assistant":[()=>import("./D2I7TZ3V.js"),"_messages:,assistantAvatarEnabled,awaitingResponse:,awaitingResponseStep:,copyEnabled,description,entryMessage,feedbackEnabled,heading,interrupt:,keepSuggestedPrompts,logEnabled,messages:,orchestrator:,readAloudEnabled,referenceElement,suggestedPrompts:,voiceInputEnabled;clearChatHistory,submitMessage;cancelInterrupt,register,submitInterrupt"],"arcgis-assistant-agent":[()=>import("./4YMVC2WQ.js"),"agent:,context:;getContext"],"arcgis-assistant-data-exploration-agent":[()=>import("./DQML5GFC.js"),"referenceElement;;getContext"],"arcgis-assistant-help-agent":[()=>import("./HQJUEXND.js"),"referenceElement;;getContext"],"arcgis-assistant-knowledge-agent":[()=>import("./2K55LM7D.js"),"context:,referenceElement,serviceUrl;getContext"],"arcgis-assistant-layer-styling-agent":[()=>import("./5TNWYXLO.js"),"referenceElement;;getContext"],"arcgis-assistant-navigation-agent":[()=>import("./MCQR5IEB.js"),"referenceElement;;getContext"],"arcgis-assistant-chat":[()=>import("./DZ5GEWTT.js"),"interrupt:,loading,messages:"],"arcgis-assistant-chat-entry":[()=>import("./FJDGBPFY.js"),"_messages:,awaitingResponse,disabled,entryPlaceholder,inputValue,keyboardShortcutsDisabled,messages:,status,voiceInputEnabled;submitMessage"],"arcgis-assistant-interrupt":[()=>import("./WALWNGLA.js"),"_messages:,message,options:,type"],"arcgis-assistant-interrupt-preview":[()=>import("./VEF7ZQXR.js"),"interrupts:"],"arcgis-assistant-message":[()=>import("./MMCPSWGL.js"),"assistantAvatarEnabled,copyEnabled,feedbackEnabled,footerDisabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-block":[()=>import("./MXPGGYZ5.js"),"block:"],"arcgis-assistant-message-feedback":[()=>import("./UUC47SR5.js"),"_messages:,feedbackEnabled,message:"],"arcgis-assistant-message-footer":[()=>import("./TCS3JLFM.js"),"_messages:,copyEnabled,feedbackEnabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-loading":[()=>import("./TSI4RYTU.js"),"assistantAvatarEnabled,interrupts:,loading,loadingMessage"],"arcgis-assistant-message-log":[()=>import("./FWLEC33J.js"),"log:,logEnabled,showLog"],"arcgis-assistant-message-read-aloud":[()=>import("./JZ4W322Q.js"),"_messages:,message:,readAloudEnabled"],"arcgis-assistant-message-text":[()=>import("./E2FJS7ZW.js"),"content"],"arcgis-assistant-speech-input":[()=>import("./P5VYRL3F.js"),"awaitingResponse,inputValue,language,mode;;clearDraftSession"],"arcgis-assistant-suggested-prompts":[()=>import("./A5BFXA66.js"),"_messages:,label,prompts:"],"arcgis-assistant-user-message":[()=>import("./RXUGYIPT.js"),"content,message:,user"]});a({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-assistant,arcgis-assistant-agent,arcgis-assistant-data-exploration-agent,arcgis-assistant-help-agent,arcgis-assistant-knowledge-agent,arcgis-assistant-layer-styling-agent,arcgis-assistant-navigation-agent,arcgis-assistant-chat,arcgis-assistant-chat-entry,arcgis-assistant-interrupt,arcgis-assistant-message,arcgis-assistant-message-block,arcgis-assistant-message-feedback,arcgis-assistant-message-footer,arcgis-assistant-message-loading,arcgis-assistant-message-log,arcgis-assistant-message-read-aloud,arcgis-assistant-message-text,arcgis-assistant-speech-input,arcgis-assistant-suggested-prompts,arcgis-assistant-user-message){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r,p,j,i=(a.importMap??={}).imports??={})=>{"agent-utils/index,agent-utils/middlewares/middleware,agent-utils/middlewares/humanInTheLoop,agent-utils/middlewares/trace".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,e,"@arcgis/ai-components/",".js")
|
package/dist/chunks/adapter.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import he from "@arcgis/core/identity/IdentityManager.js";
|
|
3
3
|
import I from "@arcgis/core/portal/Portal.js";
|
|
4
4
|
import { Annotation as b, messagesStateReducer as Te } from "@langchain/langgraph/web";
|
|
5
|
+
import "@arcgis/toolkit/string";
|
|
5
6
|
import { k as qe, j as B, i as De } from "./generateLayerDescriptions.js";
|
|
6
7
|
import "@langchain/core/messages";
|
|
7
8
|
import "@langchain/core/callbacks/dispatch/web";
|
|
@@ -50,7 +51,7 @@ import xe from "@arcgis/core/rest/knowledgeGraph/GraphQueryStreaming.js";
|
|
|
50
51
|
import "@arcgis/core/views/LinkChartView.js";
|
|
51
52
|
import { fetchKnowledgeGraph as ge, executeQueryStreaming as mt, executeSearchStreaming as yt } from "@arcgis/core/rest/knowledgeGraphService.js";
|
|
52
53
|
import ft from "@arcgis/core/rest/knowledgeGraph/GraphSearchStreaming.js";
|
|
53
|
-
const L = (e, t) => t ?? e,
|
|
54
|
+
const L = (e, t) => t ?? e, Rn = b.Root({
|
|
54
55
|
...qe(),
|
|
55
56
|
// internal to the navigation agent
|
|
56
57
|
intent: b({
|
|
@@ -115,7 +116,7 @@ async function bt({ address: e }, t) {
|
|
|
115
116
|
}
|
|
116
117
|
const Tt = i.object({
|
|
117
118
|
address: i.string().describe("The full address or place name to locate.")
|
|
118
|
-
}),
|
|
119
|
+
}), $n = f(bt, {
|
|
119
120
|
name: "goToAddress",
|
|
120
121
|
description: "Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",
|
|
121
122
|
schema: Tt
|
|
@@ -138,7 +139,7 @@ async function St({ bookmarkName: e }, t) {
|
|
|
138
139
|
}
|
|
139
140
|
const xt = E.object({
|
|
140
141
|
bookmarkName: E.string().describe("The name of the bookmark to navigate to.")
|
|
141
|
-
}),
|
|
142
|
+
}), Cn = f(St, {
|
|
142
143
|
name: "goToBookmark",
|
|
143
144
|
description: "Go to the extent of the bookmark with the given name.",
|
|
144
145
|
schema: xt
|
|
@@ -179,7 +180,7 @@ async function $t({ layerId: e, where: t }, r) {
|
|
|
179
180
|
const Ct = E.object({
|
|
180
181
|
layerId: E.string().describe("The layerId of the layer to zoom to."),
|
|
181
182
|
where: E.string().describe("The sql-92 where clause used to query features to zoom to")
|
|
182
|
-
}),
|
|
183
|
+
}), En = f($t, {
|
|
183
184
|
name: "goToFeatures",
|
|
184
185
|
description: "Go to the features that match the given filter related to the given layerId.",
|
|
185
186
|
schema: Ct
|
|
@@ -198,7 +199,7 @@ async function Nt(e, t) {
|
|
|
198
199
|
const { mapView: r } = $(t);
|
|
199
200
|
return await Et(r);
|
|
200
201
|
}
|
|
201
|
-
const It = E.object({}),
|
|
202
|
+
const It = E.object({}), Nn = f(Nt, {
|
|
202
203
|
name: "goToFullExtent",
|
|
203
204
|
description: "Zooms the map to the full world extent using Esri's Geocoding Service.",
|
|
204
205
|
schema: It
|
|
@@ -215,7 +216,7 @@ async function Ft(e, t) {
|
|
|
215
216
|
const { mapView: r } = $(t);
|
|
216
217
|
return await kt(r);
|
|
217
218
|
}
|
|
218
|
-
const zt = i.object({}),
|
|
219
|
+
const zt = i.object({}), In = f(Ft, {
|
|
219
220
|
name: "goToHomeExtent",
|
|
220
221
|
description: "Go to the initial web map view extent",
|
|
221
222
|
schema: zt
|
|
@@ -234,7 +235,7 @@ async function Dt({ layerId: e }, t) {
|
|
|
234
235
|
}
|
|
235
236
|
const At = E.object({
|
|
236
237
|
layerId: E.string().describe("The id of the layer to navigate to")
|
|
237
|
-
}),
|
|
238
|
+
}), kn = f(Dt, {
|
|
238
239
|
name: "goToLayer",
|
|
239
240
|
description: "Zooms the map view to the full extent of the top matching layer.",
|
|
240
241
|
schema: At
|
|
@@ -248,7 +249,7 @@ async function Lt({ scale: e }, t) {
|
|
|
248
249
|
}
|
|
249
250
|
const jt = i.object({
|
|
250
251
|
scale: i.number().describe("The map scale of the view to go to.")
|
|
251
|
-
}),
|
|
252
|
+
}), Fn = f(Lt, {
|
|
252
253
|
name: "goToScale",
|
|
253
254
|
description: "Go to the specified view scale.",
|
|
254
255
|
schema: jt
|
|
@@ -282,7 +283,7 @@ const Mt = i.object({
|
|
|
282
283
|
}),
|
|
283
284
|
zoom: i.number().optional().describe("The zoom level. Higher values = more zoomed in."),
|
|
284
285
|
scale: i.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")
|
|
285
|
-
}),
|
|
286
|
+
}), zn = f(Ot, {
|
|
286
287
|
name: "goToViewpoint",
|
|
287
288
|
description: "Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",
|
|
288
289
|
schema: Mt
|
|
@@ -296,7 +297,7 @@ async function _t({ zoom: e }, t) {
|
|
|
296
297
|
}
|
|
297
298
|
const Wt = i.object({
|
|
298
299
|
zoom: i.number().min(1).max(20).describe("The zoom level of the view to go to.")
|
|
299
|
-
}),
|
|
300
|
+
}), qn = f(_t, {
|
|
300
301
|
name: "goToZoom",
|
|
301
302
|
description: 'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',
|
|
302
303
|
schema: Wt
|
|
@@ -331,7 +332,7 @@ const Vt = (e, t = 300) => {
|
|
|
331
332
|
if (a == null)
|
|
332
333
|
throw new Error(`${t} missing in config.configurable.services`);
|
|
333
334
|
return a;
|
|
334
|
-
},
|
|
335
|
+
}, Dn = (e, t) => (r, a) => {
|
|
335
336
|
const o = a?.configurable?.services;
|
|
336
337
|
for (const n of e)
|
|
337
338
|
if (!o?.[n])
|
|
@@ -422,7 +423,7 @@ const Zt = i.object({
|
|
|
422
423
|
fields: i.array(i.string()).describe("The fields to use for the chart renderer (multiple numeric fields)"),
|
|
423
424
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
424
425
|
includeSize: i.boolean().optional().describe("Whether to vary the chart size (chart-size)")
|
|
425
|
-
}),
|
|
426
|
+
}), An = f(Jt, {
|
|
426
427
|
name: "chart",
|
|
427
428
|
description: `Label: Charts
|
|
428
429
|
Description: Show the values of two or more categories as a proportion of the total using a pie chart.
|
|
@@ -505,7 +506,7 @@ const rr = i.object({
|
|
|
505
506
|
fields: i.array(i.string()).describe("The field(s) to use for the color-age renderer (temporal/date data)"),
|
|
506
507
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
507
508
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color ramp")
|
|
508
|
-
}),
|
|
509
|
+
}), Pn = f(tr, {
|
|
509
510
|
name: "color-age",
|
|
510
511
|
description: `Label: Age (color)
|
|
511
512
|
Description: Use colors along a continuous color ramp to represent the age of features. Age reflects the length of time from a start date to an end date.
|
|
@@ -584,7 +585,7 @@ const sr = i.object({
|
|
|
584
585
|
fields: i.array(i.string()).describe("The field(s) to use for the color renderer"),
|
|
585
586
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
586
587
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color ramp")
|
|
587
|
-
}),
|
|
588
|
+
}), Ln = f(ir, {
|
|
588
589
|
name: "color",
|
|
589
590
|
description: `Label: Counts and Amounts (color)
|
|
590
591
|
Description: Vary color along a continuous color ramp to represent numeric or ranked data.
|
|
@@ -662,7 +663,7 @@ const pr = i.object({
|
|
|
662
663
|
fields: i.array(i.string()).describe("The fields to use for the color-size univariate renderer"),
|
|
663
664
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
664
665
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color and size ramps")
|
|
665
|
-
}),
|
|
666
|
+
}), jn = f(dr, {
|
|
666
667
|
name: "color-size-univariate",
|
|
667
668
|
description: `Label: Color and Size (univariate)
|
|
668
669
|
Description: Vary symbol size and color based on the values of two numeric attributes.
|
|
@@ -736,7 +737,7 @@ const gr = i.object({
|
|
|
736
737
|
layerId: i.string().describe("The id of the layer to apply the dot density renderer to"),
|
|
737
738
|
fields: i.array(i.string()).describe("The field(s) to use for the dot density renderer (population or count data)"),
|
|
738
739
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use")
|
|
739
|
-
}),
|
|
740
|
+
}), Gn = f(fr, {
|
|
740
741
|
name: "dot-density",
|
|
741
742
|
description: `Dot Density
|
|
742
743
|
Use dot density to visualize the distribution of one attribute or compare the density of multiple attributes. This is only valid for polygon layers.
|
|
@@ -811,7 +812,7 @@ const Sr = i.object({
|
|
|
811
812
|
layerId: i.string().describe("The id of the layer to apply the heatmap renderer to"),
|
|
812
813
|
fields: i.array(i.string()).describe("The field(s) to use for the heatmap renderer (typically point density)"),
|
|
813
814
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use")
|
|
814
|
-
}),
|
|
815
|
+
}), On = f(vr, {
|
|
815
816
|
name: "heatmap",
|
|
816
817
|
description: `Label: Heat Map
|
|
817
818
|
Description: Show areas of high density with colors that appear to glow hotter. This is only valid for point layers.
|
|
@@ -886,7 +887,7 @@ const Er = i.object({
|
|
|
886
887
|
fields: i.array(i.string()).describe("The fields to use for the predominance renderer (competing categories)"),
|
|
887
888
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
888
889
|
includeSize: i.boolean().optional().describe("Whether to include size visualization (predominance-size)")
|
|
889
|
-
}),
|
|
890
|
+
}), Mn = f(Cr, {
|
|
890
891
|
name: "predominance",
|
|
891
892
|
description: `Label: Predominant category
|
|
892
893
|
Description: Compare attributes that share a common subject and unit of measurement to see which has the highest value.
|
|
@@ -967,7 +968,7 @@ const zr = i.object({
|
|
|
967
968
|
layerId: i.string().describe("The id of the layer to apply the relationship renderer to"),
|
|
968
969
|
fields: i.array(i.string()).describe("The two fields to use for the relationship renderer (bivariate visualization)"),
|
|
969
970
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use")
|
|
970
|
-
}),
|
|
971
|
+
}), Qn = f(Fr, {
|
|
971
972
|
name: "relationship",
|
|
972
973
|
description: `Label: Relationship
|
|
973
974
|
Description: Overlays two color ramps to represent the relationship between two numeric attributes.
|
|
@@ -1038,7 +1039,7 @@ const Lr = i.object({
|
|
|
1038
1039
|
fields: i.array(i.string()).describe("The field(s) to use for the size-age renderer (temporal data with size)"),
|
|
1039
1040
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
1040
1041
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the size ramp")
|
|
1041
|
-
}),
|
|
1042
|
+
}), _n = f(Pr, {
|
|
1042
1043
|
name: "size-age",
|
|
1043
1044
|
description: `Label: Age (size)
|
|
1044
1045
|
Description: Vary symbol sizes along a continuous ramp to represent the age of features. Age reflects the length of time from a start date to an end date.
|
|
@@ -1111,7 +1112,7 @@ const Qr = i.object({
|
|
|
1111
1112
|
fields: i.array(i.string()).describe("The field(s) to use for the size renderer (numeric data)"),
|
|
1112
1113
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
1113
1114
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the size ramp")
|
|
1114
|
-
}),
|
|
1115
|
+
}), Wn = f(Mr, {
|
|
1115
1116
|
name: "size",
|
|
1116
1117
|
description: `Label: Counts and Amounts (size)
|
|
1117
1118
|
Description: Vary symbol sizes along a continuous ramp to represent numeric or ranked data.
|
|
@@ -1193,7 +1194,7 @@ const Kr = i.object({
|
|
|
1193
1194
|
fields: i.array(i.string()).describe("The field(s) to use for the type renderer (categorical data)"),
|
|
1194
1195
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
1195
1196
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color scheme")
|
|
1196
|
-
}),
|
|
1197
|
+
}), Vn = f(Ur, {
|
|
1197
1198
|
name: "type",
|
|
1198
1199
|
description: `Label: Types (unique symbols)
|
|
1199
1200
|
Description: Represent features as categories with different symbol colors or shapes. Examples include type of tree, road class, or province name.
|
|
@@ -1201,13 +1202,13 @@ Keywords: categorical, category, type, unique, discrete, point of interest, regi
|
|
|
1201
1202
|
Example: Color each feature based on the region it belongs to
|
|
1202
1203
|
Fields: This style requires a single field which may be a string, number, or date type. It is usually a string.`,
|
|
1203
1204
|
schema: Kr
|
|
1204
|
-
}),
|
|
1205
|
+
}), Un = b.Root({
|
|
1205
1206
|
...B(),
|
|
1206
1207
|
vectorSearchLayerIds: b(),
|
|
1207
1208
|
vectorSearchFieldResults: b(),
|
|
1208
1209
|
layerFieldInfo: b(),
|
|
1209
1210
|
selectedLayerId: b()
|
|
1210
|
-
}),
|
|
1211
|
+
}), Kn = b.Root({
|
|
1211
1212
|
...B(),
|
|
1212
1213
|
vectorSearchLayerIds: b(),
|
|
1213
1214
|
vectorSearchFieldResults: b(),
|
|
@@ -1414,7 +1415,7 @@ const H = async (e, t) => {
|
|
|
1414
1415
|
return e;
|
|
1415
1416
|
const t = re(e);
|
|
1416
1417
|
return t ? t.toISOString().slice(0, 10) : null;
|
|
1417
|
-
},
|
|
1418
|
+
}, Bn = () => {
|
|
1418
1419
|
const e = (/* @__PURE__ */ new Date()).getTimezoneOffset(), t = e <= 0 ? "+" : "-", r = Math.floor(Math.abs(e) / 60).toString().padStart(2, "0"), a = (Math.abs(e) % 60).toString().padStart(2, "0"), o = `${t}${r}:${a}`;
|
|
1419
1420
|
return { userTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone, userTimezoneOffset: o };
|
|
1420
1421
|
}, da = (e, t, r) => {
|
|
@@ -1921,8 +1922,8 @@ USE THIS TOOL FOR:
|
|
|
1921
1922
|
|
|
1922
1923
|
This is the DEFAULT tool for most queries. When in doubt, use this tool.`,
|
|
1923
1924
|
schema: Ga
|
|
1924
|
-
}), Ma = [Sa, Na, Da, Oa],
|
|
1925
|
-
async function
|
|
1925
|
+
}), Ma = [Sa, Na, Da, Oa], Hn = [la, ea, Zr], Qa = new ot(Ma, { handleToolErrors: !1 });
|
|
1926
|
+
async function Jn(e, t) {
|
|
1926
1927
|
const { messages: r } = await Qa.invoke({ messages: e.dataExplorationMessages }, t), a = [], o = [];
|
|
1927
1928
|
for (const n of r) {
|
|
1928
1929
|
const l = n.content;
|
|
@@ -1959,7 +1960,7 @@ async function Hn(e, t) {
|
|
|
1959
1960
|
`)) : "Query executed."
|
|
1960
1961
|
};
|
|
1961
1962
|
}
|
|
1962
|
-
const
|
|
1963
|
+
const Zn = b.Root({
|
|
1963
1964
|
...B(),
|
|
1964
1965
|
// internal to the help agent
|
|
1965
1966
|
helpInternalState: b({
|
|
@@ -1984,13 +1985,13 @@ ${o}`;
|
|
|
1984
1985
|
}, Wa = async ({ layerTitle: e }, t) => {
|
|
1985
1986
|
const r = Re(t, "layersAndFieldsRegistry");
|
|
1986
1987
|
return _a(r, e);
|
|
1987
|
-
},
|
|
1988
|
+
}, Yn = f(Wa, {
|
|
1988
1989
|
name: "listLayerFields",
|
|
1989
1990
|
description: "Lists all fields for a given layer by title. Use ONLY when the user explicitly asks to see fields, columns, or attributes of a specific named layer. Do NOT call this tool for general help questions, capability overviews, or layer listing.",
|
|
1990
1991
|
schema: i.object({
|
|
1991
1992
|
layerTitle: i.string().describe("The title or partial title of the layer to list fields for.")
|
|
1992
1993
|
})
|
|
1993
|
-
}),
|
|
1994
|
+
}), Xn = b.Root({
|
|
1994
1995
|
...B(),
|
|
1995
1996
|
intent: b({
|
|
1996
1997
|
reducer: (e, t) => t
|
|
@@ -2028,7 +2029,7 @@ function Z(e) {
|
|
|
2028
2029
|
view: a
|
|
2029
2030
|
};
|
|
2030
2031
|
}
|
|
2031
|
-
function
|
|
2032
|
+
function ei(e) {
|
|
2032
2033
|
const r = e?.configurable?.context;
|
|
2033
2034
|
if (Ie(e) === "knowledgeGraph")
|
|
2034
2035
|
return "knowledgeGraph";
|
|
@@ -2210,7 +2211,7 @@ function Ha(e) {
|
|
|
2210
2211
|
}
|
|
2211
2212
|
}
|
|
2212
2213
|
function Y(e) {
|
|
2213
|
-
return e?.
|
|
2214
|
+
return e?.signal;
|
|
2214
2215
|
}
|
|
2215
2216
|
function Ja(e, t) {
|
|
2216
2217
|
return t ? `${e}
|
|
@@ -2611,7 +2612,7 @@ Number of records added: ${d.length}`,
|
|
|
2611
2612
|
error: c
|
|
2612
2613
|
};
|
|
2613
2614
|
}
|
|
2614
|
-
},
|
|
2615
|
+
}, ti = f(lo, {
|
|
2615
2616
|
name: W,
|
|
2616
2617
|
description: "Adds records (entities or relationships) to the current link chart visualization from an inquiry into the knowledge graph data. The inquiry will retrieve data from the graph database that will serve as the basis for the records to be added to the link chart. The user should have explicitly requested to add records to the current link chart from their prompt.",
|
|
2617
2618
|
schema: so
|
|
@@ -2653,7 +2654,7 @@ const ae = "applyLayout", uo = i.object({
|
|
|
2653
2654
|
}
|
|
2654
2655
|
};
|
|
2655
2656
|
}
|
|
2656
|
-
},
|
|
2657
|
+
}, ri = f(po, {
|
|
2657
2658
|
name: ae,
|
|
2658
2659
|
description: "Apply a diagram layout to the link chart",
|
|
2659
2660
|
schema: uo
|
|
@@ -2683,7 +2684,7 @@ const oe = "changeNonspatialVisibility", mo = i.object({
|
|
|
2683
2684
|
}
|
|
2684
2685
|
};
|
|
2685
2686
|
}
|
|
2686
|
-
},
|
|
2687
|
+
}, ai = f(yo, {
|
|
2687
2688
|
name: oe,
|
|
2688
2689
|
description: "Change whether or not nonspatial data is visible in the link chart. The value must be either 'hidden' or 'visible'.",
|
|
2689
2690
|
schema: mo
|
|
@@ -2782,7 +2783,7 @@ Explanation: ${c}`,
|
|
|
2782
2783
|
}
|
|
2783
2784
|
};
|
|
2784
2785
|
}
|
|
2785
|
-
},
|
|
2786
|
+
}, oi = f(wo, {
|
|
2786
2787
|
name: V,
|
|
2787
2788
|
description: "Creates a new link chart visualization from an inquiry into the knowledge graph data. The inquiry will retrieve data from the graph database that will serve as the basis for the new link chart. The user should have explicitly requested the creation of a new link chart from their prompt.",
|
|
2788
2789
|
schema: go
|
|
@@ -2852,7 +2853,7 @@ ${h.length > p ? `Showing top ${p} results:
|
|
|
2852
2853
|
queryResults: c
|
|
2853
2854
|
}
|
|
2854
2855
|
};
|
|
2855
|
-
},
|
|
2856
|
+
}, ni = f(To, {
|
|
2856
2857
|
name: ne,
|
|
2857
2858
|
description: "Allows users to explore the data in their knowledge graph via cypher query. Generates and executes a cypher query based on the user's inquiry into the knowledge graph, and displays the results in the chat pane without modifying the user's link chart if any. Use this tool when the user is asking an exploratory question about their data as a whole that can be answered via cypher query, for example 'What are the top 5 suppliers by total parts cost?' or 'How many employees do we have in each department?'.",
|
|
2858
2859
|
schema: bo
|
|
@@ -2888,7 +2889,7 @@ Explanation: ${l}`,
|
|
|
2888
2889
|
error: n
|
|
2889
2890
|
};
|
|
2890
2891
|
}
|
|
2891
|
-
},
|
|
2892
|
+
}, ii = f(So, {
|
|
2892
2893
|
name: ie,
|
|
2893
2894
|
description: "Generates an Open Cypher query based on the user's prompt which represents an inquiry into the data of the knowledge service and its graph database, attempting to filter based on certain conditions and traverse specified relationships. The generated query should be syntactically correct and optimized for performance.",
|
|
2894
2895
|
schema: vo
|
|
@@ -2986,56 +2987,56 @@ const se = "searchGraphData", $o = i.object({
|
|
|
2986
2987
|
searchResults: o.results
|
|
2987
2988
|
}
|
|
2988
2989
|
};
|
|
2989
|
-
},
|
|
2990
|
+
}, si = f(Co, {
|
|
2990
2991
|
name: se,
|
|
2991
2992
|
description: "Allows users to search the knowledge graph for text matching their inquiry, using lucene search syntax, against indexed string properties defined on their entities and relationships. Use this tool when the user asks a question about their knowledge graph data as a whole, that could be answered via lucene text search of properties stored on graph elements, e.g requiring fuzzy matching. Otherwise if the inquiry is looking for connected records (e.g. paths), data aggregations, etc explore the data via the queryGraphData tool.",
|
|
2992
2993
|
schema: $o
|
|
2993
2994
|
});
|
|
2994
2995
|
export {
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
2996
|
+
Pn as A,
|
|
2997
|
+
Ln as B,
|
|
2998
|
+
jn as C,
|
|
2999
|
+
Gn as D,
|
|
3000
|
+
On as E,
|
|
3001
|
+
Mn as F,
|
|
3001
3002
|
de as G,
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3003
|
+
Zn as H,
|
|
3004
|
+
Qn as I,
|
|
3005
|
+
_n as J,
|
|
3006
|
+
Wn as K,
|
|
3007
|
+
Vn as L,
|
|
3008
|
+
Un as M,
|
|
3009
|
+
Rn as N,
|
|
3010
|
+
Bn as O,
|
|
3011
|
+
Hn as P,
|
|
3011
3012
|
Ma as Q,
|
|
3012
3013
|
k as R,
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3014
|
+
Kn as S,
|
|
3015
|
+
Jn as T,
|
|
3016
|
+
ri as a,
|
|
3017
|
+
ii as b,
|
|
3018
|
+
ai as c,
|
|
3019
|
+
oi as d,
|
|
3020
|
+
ti as e,
|
|
3020
3021
|
Re as f,
|
|
3021
3022
|
te as g,
|
|
3022
|
-
|
|
3023
|
+
ei as h,
|
|
3023
3024
|
O as i,
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3025
|
+
Xn as j,
|
|
3026
|
+
$n as k,
|
|
3027
|
+
Yn as l,
|
|
3028
|
+
Cn as m,
|
|
3029
|
+
En as n,
|
|
3030
|
+
Nn as o,
|
|
3031
|
+
In as p,
|
|
3032
|
+
ni as q,
|
|
3033
|
+
Dn as r,
|
|
3034
|
+
si as s,
|
|
3034
3035
|
Vt as t,
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3036
|
+
kn as u,
|
|
3037
|
+
Fn as v,
|
|
3038
|
+
zn as w,
|
|
3039
|
+
qn as x,
|
|
3039
3040
|
$ as y,
|
|
3040
|
-
|
|
3041
|
+
An as z
|
|
3041
3042
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { StateGraph as f, START as x, END as h, Command as k } from "@langchain/langgraph/web";
|
|
3
|
-
import { a as b, c as _, b as K, d as A, e as T, s as v, q
|
|
3
|
+
import { a as b, c as _, b as K, d as A, e as T, s as v, q, g as u, h as M, t as c, r as S, i as C, G as E, j as m } from "./adapter.js";
|
|
4
4
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
5
|
import "@arcgis/core/portal/Portal.js";
|
|
6
|
+
import "@arcgis/toolkit/string";
|
|
6
7
|
import { h as G, e as N } from "./generateLayerDescriptions.js";
|
|
7
8
|
import { AIMessage as R } from "@langchain/core/messages";
|
|
8
9
|
import "@langchain/core/callbacks/dispatch/web";
|
|
@@ -21,10 +22,10 @@ const w = [
|
|
|
21
22
|
A,
|
|
22
23
|
T,
|
|
23
24
|
v,
|
|
24
|
-
|
|
25
|
+
q
|
|
25
26
|
];
|
|
26
27
|
async function z(e, a) {
|
|
27
|
-
const i = await u("arcgis_knowledge_tool_prompt"), o =
|
|
28
|
+
const i = await u("arcgis_knowledge_tool_prompt"), o = M(a), n = {
|
|
28
29
|
assignedTask: e.agentExecutionContext.assignedTask,
|
|
29
30
|
userRequest: e.agentExecutionContext.userRequest,
|
|
30
31
|
priorSteps: e.agentExecutionContext.priorSteps,
|
|
@@ -126,7 +127,7 @@ async function I(e, a) {
|
|
|
126
127
|
}
|
|
127
128
|
const V = (e, a) => (
|
|
128
129
|
//agent services (ex: embeddingsWorker) would go in the array below, if required.
|
|
129
|
-
|
|
130
|
+
S([], "ArcgisKnowledge Agent")(e, a)
|
|
130
131
|
);
|
|
131
132
|
async function j(e, a) {
|
|
132
133
|
const o = (e.arcgisKnowledgeToolResult ?? []).map((d) => ({
|
|
@@ -152,7 +153,7 @@ async function j(e, a) {
|
|
|
152
153
|
};
|
|
153
154
|
}
|
|
154
155
|
function g(e) {
|
|
155
|
-
return async (a, i) => i?.
|
|
156
|
+
return async (a, i) => i?.signal?.aborted ? (await p({ text: "Knowledge Agent execution cancelled" }, i), new k({
|
|
156
157
|
goto: h,
|
|
157
158
|
update: {
|
|
158
159
|
outputMessage: "Knowledge Agent execution cancelled",
|
|
@@ -199,7 +200,7 @@ _example: "Discover and add all the relationships originating at 'Entity E' to t
|
|
|
199
200
|
_example: "Show me all entities with a name similar to 'Smith' and add them to the link chart"_
|
|
200
201
|
_example: "Find reports in my graph that have a title similar to 'Quarterly Earnings'"_
|
|
201
202
|
_example: "Find John Smith and all people he has made phone calls to in the last year"_
|
|
202
|
-
_example: "What is the average age of all people who work for Esri?"_`,
|
|
203
|
+
_example: "What is the average age of all people who work for Esri?"_`, ie = {
|
|
203
204
|
id: "arcgisKnowledge",
|
|
204
205
|
name: "ArcgisKnowledge Agent",
|
|
205
206
|
description: P,
|
|
@@ -207,5 +208,5 @@ _example: "What is the average age of all people who work for Esri?"_`, re = {
|
|
|
207
208
|
workspace: m
|
|
208
209
|
};
|
|
209
210
|
export {
|
|
210
|
-
|
|
211
|
+
ie as A
|
|
211
212
|
};
|