@arcgis/ai-components 5.2.0-next.103 → 5.2.0-next.105
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 +40 -40
- package/dist/agent-utils/middlewares/trace.js +5 -5
- package/dist/cdn/{FXP5UIQU.js → 2NDBI2VA.js} +1 -1
- package/dist/cdn/{C4FEETBZ.js → 2W7LK4HA.js} +1 -1
- package/dist/cdn/{LAYVGCPL.js → 4RDNI22D.js} +3 -3
- package/dist/cdn/{Z5HWPSZN.js → 6FCU2KJP.js} +1 -1
- package/dist/cdn/{ICQCK5D3.js → 7BJ4JKLG.js} +1 -1
- package/dist/cdn/{TEPP7YPR.js → 7HS5KX3J.js} +1 -1
- package/dist/cdn/{G7OMHU2B.js → 7UUYJTKT.js} +1 -1
- package/dist/cdn/{B2JDVLA6.js → 7VYYQ7BT.js} +1 -1
- package/dist/cdn/{JCOA24UH.js → BXQ4I5HB.js} +1 -1
- package/dist/cdn/{IJVMUS2L.js → C7LGDNB3.js} +1 -1
- package/dist/cdn/{TCH5I5LS.js → CGJINV7H.js} +1 -1
- package/dist/cdn/{RVSTAUQS.js → D2SS763Z.js} +1 -1
- package/dist/cdn/{MY47B3CE.js → DKZYPPJV.js} +1 -1
- package/dist/cdn/{OX64WOEL.js → G6CR7JVM.js} +1 -1
- package/dist/cdn/{5XZLS7UO.js → GL7BPKBN.js} +1 -1
- package/dist/cdn/{D5UFYQHN.js → HKOGIZDQ.js} +2 -2
- package/dist/cdn/{BE7BRJZD.js → NYJYRCGA.js} +1 -1
- package/dist/cdn/{6YYPVU7H.js → P4GFYBBO.js} +1 -1
- package/dist/cdn/{HHUQXL3R.js → PYGX4HN7.js} +1 -1
- package/dist/cdn/RFVZ7KCG.js +66 -0
- package/dist/cdn/{WJXXOKGA.js → ROQGPAR5.js} +1 -1
- package/dist/cdn/SWH6ZHD4.js +18 -0
- package/dist/cdn/{TMVF2W5N.js → W4JQDITQ.js} +1 -1
- package/dist/cdn/agent-utils/index.js +1 -1
- package/dist/cdn/agent-utils/middlewares/trace.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/arcgisKnowledgeGraph.js +1 -1
- package/dist/chunks/dataExplorationGraph.js +30 -30
- package/dist/chunks/generateLayerDescriptions.js +15 -15
- package/dist/components/arcgis-assistant/customElement.d.ts +23 -3
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +6 -6
- package/dist/cdn/5FL5BTTX.js +0 -66
- package/dist/cdn/UHNVDALX.js +0 -18
|
@@ -124,6 +124,9 @@ const se = () => {
|
|
|
124
124
|
return new Y({
|
|
125
125
|
modelName: n,
|
|
126
126
|
apiKey: "dummy-key",
|
|
127
|
+
useResponsesApi: !0,
|
|
128
|
+
// Prevent follow-up Responses API calls from replaying encrypted reasoning items the ArcGIS proxy cannot verify.
|
|
129
|
+
zdrEnabled: !0,
|
|
127
130
|
configuration: {
|
|
128
131
|
baseURL: i,
|
|
129
132
|
fetch: await _({ config: o })
|
|
@@ -147,7 +150,7 @@ const se = () => {
|
|
|
147
150
|
description: r.string().min(1)
|
|
148
151
|
});
|
|
149
152
|
r.array(fe);
|
|
150
|
-
const
|
|
153
|
+
const C = (e) => JSON.stringify(e, null, 2), he = (e) => {
|
|
151
154
|
const t = e.map((n) => n.id), o = r.enum(t);
|
|
152
155
|
return r.object({
|
|
153
156
|
intent: o.nullable(),
|
|
@@ -176,11 +179,11 @@ const A = (e) => JSON.stringify(e, null, 2), he = (e) => {
|
|
|
176
179
|
currentIntent: "none",
|
|
177
180
|
finalOutputMessage: "No agents registered; skipping intent detection."
|
|
178
181
|
};
|
|
179
|
-
const a = await E("intent_prompt"), c =
|
|
182
|
+
const a = await E("intent_prompt"), c = C(s), l = he(s), p = {
|
|
180
183
|
registeredAgents: c,
|
|
181
|
-
priorSteps:
|
|
184
|
+
priorSteps: C(e.agentExecutionContext.priorSteps),
|
|
182
185
|
userRequest: e.agentExecutionContext.userRequest
|
|
183
|
-
}, b = await q.fromTemplate(a).format(p),
|
|
186
|
+
}, b = await q.fromTemplate(a).format(p), A = G({
|
|
184
187
|
model: await w({
|
|
185
188
|
modelTier: "fast",
|
|
186
189
|
config: t
|
|
@@ -205,7 +208,7 @@ const A = (e) => JSON.stringify(e, null, 2), he = (e) => {
|
|
|
205
208
|
Q({ runLimit: 2 })
|
|
206
209
|
]
|
|
207
210
|
}), { structuredResponse: v } = await le({
|
|
208
|
-
agent:
|
|
211
|
+
agent: A,
|
|
209
212
|
messages: e.agentExecutionContext.messages,
|
|
210
213
|
config: t
|
|
211
214
|
}), u = l.parse(
|
|
@@ -321,11 +324,8 @@ Description: {description}`, Ke = r.object({
|
|
|
321
324
|
messages: n,
|
|
322
325
|
config: s
|
|
323
326
|
})).invoke(i ?? {}, s);
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
const l = c.content;
|
|
327
|
-
return typeof l == "string" ? l : JSON.stringify(l);
|
|
328
|
-
}, O = async (e) => {
|
|
327
|
+
return typeof c == "string" ? c : c.text;
|
|
328
|
+
}, $ = async (e) => {
|
|
329
329
|
const { promptText: t, modelTier: o = "default", messages: n, inputVariables: i, schema: s, config: a } = e, c = R(t, n ?? []), p = (await w({ modelTier: o, config: a })).withStructuredOutput(s);
|
|
330
330
|
return await c.pipe(p).invoke(i ?? {}, a);
|
|
331
331
|
}, He = async (e) => {
|
|
@@ -338,8 +338,8 @@ Description: {description}`, Ke = r.object({
|
|
|
338
338
|
alias: m.string()
|
|
339
339
|
}), Ie = m.object({
|
|
340
340
|
fields: m.array(Se)
|
|
341
|
-
}),
|
|
342
|
-
const o =
|
|
341
|
+
}), O = (e, t) => e.getFieldAlias(t) ?? void 0, I = (e, t) => O(e, t.name) ?? t.alias ?? "", ke = (e, t) => {
|
|
342
|
+
const o = O(e, t.name);
|
|
343
343
|
return !!(o && o !== (t.alias ?? ""));
|
|
344
344
|
};
|
|
345
345
|
function D(e, t) {
|
|
@@ -371,7 +371,7 @@ const We = async (e) => {
|
|
|
371
371
|
existingLayerTitle: e.title,
|
|
372
372
|
existingLayerDescription: e.portalItem?.description,
|
|
373
373
|
fieldInformation: n
|
|
374
|
-
}, s = await
|
|
374
|
+
}, s = await $({
|
|
375
375
|
promptText: o,
|
|
376
376
|
schema: Ie,
|
|
377
377
|
inputVariables: i
|
|
@@ -389,7 +389,7 @@ const We = async (e) => {
|
|
|
389
389
|
existingLayerSnippet: e.portalItem?.snippet,
|
|
390
390
|
layerGeometryType: e.geometryType
|
|
391
391
|
};
|
|
392
|
-
return { ...await
|
|
392
|
+
return { ...await $({
|
|
393
393
|
promptText: n,
|
|
394
394
|
schema: Ee,
|
|
395
395
|
inputVariables: s
|
|
@@ -406,7 +406,7 @@ export {
|
|
|
406
406
|
xe as f,
|
|
407
407
|
We as g,
|
|
408
408
|
He as h,
|
|
409
|
-
|
|
409
|
+
$ as i,
|
|
410
410
|
ie as j,
|
|
411
411
|
ae as k,
|
|
412
412
|
ve as l,
|
|
@@ -118,26 +118,46 @@ export abstract class ArcgisAssistant extends LitElement {
|
|
|
118
118
|
waitingForUserInputMessage: string;
|
|
119
119
|
}>;
|
|
120
120
|
/**
|
|
121
|
-
* The IDs of the agents available
|
|
121
|
+
* The IDs of the agents available for automatic intent routing.
|
|
122
122
|
* A single ID still uses automatic routing and does not enable direct routing.
|
|
123
123
|
* This property cannot be used together with [alwaysUseAgentId](https://developers.arcgis.com/javascript/latest/references/ai-components/components/arcgis-assistant/#alwaysUseAgentId).
|
|
124
|
+
* If this property is not set, all registered agents are available for routing.
|
|
125
|
+
*
|
|
126
|
+
* > **Note:** Agent ids for custom agents are automatically created from the agent's
|
|
127
|
+
* > [BaseAgent.name](https://developers.arcgis.com/javascript/latest/references/ai-components/agent-utils/BaseAgent/#name) property.
|
|
128
|
+
* > For example, an agent with the name "My Custom Agent" will have the id "my-custom-agent".
|
|
129
|
+
*
|
|
130
|
+
* Agent ids for SDK agents are as follows:
|
|
131
|
+
*
|
|
132
|
+
* - Navigation Agent: `navigation`
|
|
133
|
+
* - Data Exploration Agent: `dataExploration`
|
|
134
|
+
* - Help Agent: `help`
|
|
135
|
+
* - Knowledge Agent: `arcgisKnowledge`
|
|
124
136
|
*
|
|
125
137
|
* @since 5.2
|
|
126
138
|
* @example
|
|
127
139
|
* ```js
|
|
128
140
|
* const assistant = document.querySelector("arcgis-assistant");
|
|
141
|
+
* // only route user questions to either the navigation or help agents
|
|
142
|
+
* // even if other agents are registered to the assistant
|
|
129
143
|
* assistant.allowedAgentIds = ["navigation", "help"];
|
|
130
144
|
* ```
|
|
131
145
|
*/
|
|
132
146
|
accessor allowedAgentIds: readonly string[] | undefined;
|
|
133
147
|
/**
|
|
134
148
|
* The ID of the agent that should process every user message without intent routing.
|
|
135
|
-
* When
|
|
149
|
+
* When set, the assistant will route all user messages to the specified agent.
|
|
150
|
+
*
|
|
151
|
+
* This is useful for applications that want to bypass the orchestrator's default intent routing
|
|
152
|
+
* in favor of a single custom agent that directly handles its own intent orchestration to one or more sub-agents. This property
|
|
153
|
+
* should not be used to route requests to an SDK agent, as the SDK agents do not have their own intent routing outside of the orchestrator.
|
|
154
|
+
*
|
|
155
|
+
* This property cannot be used together with [allowedAgentIds](https://developers.arcgis.com/javascript/latest/references/ai-components/components/arcgis-assistant/#allowedAgentIds).
|
|
136
156
|
*
|
|
137
157
|
* @since 5.2
|
|
138
158
|
* @example
|
|
139
159
|
* ```html
|
|
140
|
-
* <arcgis-assistant always-use-agent-id="
|
|
160
|
+
* <arcgis-assistant always-use-agent-id="my-custom-orchestration-agent"></arcgis-assistant>
|
|
141
161
|
* ```
|
|
142
162
|
*/
|
|
143
163
|
accessor alwaysUseAgentId: string | undefined;
|
|
@@ -107,7 +107,7 @@ import type { ArcgisMap as ArcgisMap } from "@arcgis/map-components/components/a
|
|
|
107
107
|
export abstract class ArcgisAssistantKnowledgeAgent extends LitElement {
|
|
108
108
|
/**
|
|
109
109
|
* Optional context for the knowledge agent. If the agent does not have a view or kg service url provided via reference element or serviceUrl property
|
|
110
|
-
* a knowledge graph can be provided directly via context to enable Knowledge Service related
|
|
110
|
+
* a knowledge graph can be provided directly via context to enable Knowledge Service related capabilities.
|
|
111
111
|
*
|
|
112
112
|
* Depending on the context provided, different capabilities will be available.
|
|
113
113
|
*/
|