@arcgis/ai-components 5.2.0-next.5 → 5.2.0-next.51
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/FunctionAgent.d.ts +2 -2
- package/dist/agent-utils/LLMAgent.d.ts +2 -2
- package/dist/agent-utils/LLMAgent.js +1 -0
- package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
- package/dist/agent-utils/index.d.ts +177 -0
- package/dist/agent-utils/index.js +167 -0
- package/dist/agent-utils/middlewares/trace.d.ts +2 -0
- package/dist/agent-utils/middlewares/trace.js +25 -33
- package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
- package/dist/agent-utils/types.d.ts +36 -7
- package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
- package/dist/cdn/2ER3LN6U.js +2 -0
- package/dist/cdn/2W6XPTA6.js +9 -0
- package/dist/cdn/3DJDRAGV.js +2 -0
- package/dist/cdn/3LCF5HIE.js +3 -0
- package/dist/cdn/{AMP6IALT.js → 3UEKINYC.js} +1 -1
- package/dist/cdn/434TAA3J.js +2 -0
- package/dist/cdn/4CEMUECT.js +2 -0
- package/dist/cdn/4G5XCUE5.js +2 -0
- package/dist/cdn/57OMVTIU.js +2 -0
- package/dist/cdn/5I35MJXT.js +48 -0
- package/dist/cdn/6O6KMX3M.js +2 -0
- package/dist/cdn/6U7TEAAJ.js +2 -0
- package/dist/cdn/7FY4G4K2.js +2 -0
- package/dist/cdn/7YIRK2E3.js +2 -0
- package/dist/cdn/A4JLOAOH.js +2 -0
- package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
- package/dist/cdn/APFZY4PI.js +2 -0
- package/dist/cdn/BE7ZN5FZ.js +2 -0
- package/dist/cdn/{FL4W4VYN.js → BL273EGZ.js} +17 -1
- package/dist/cdn/BMGQJYTE.js +2 -0
- package/dist/cdn/{5ZZGKP7N.js → CEKOEHB3.js} +1 -1
- package/dist/cdn/CMG2NY3K.js +2 -0
- package/dist/cdn/DMLRWHBA.js +2 -0
- package/dist/cdn/EQLRFZVU.js +18 -0
- package/dist/cdn/EW6AYEUX.js +36 -0
- package/dist/cdn/F5SUU35Z.js +2 -0
- package/dist/cdn/FYW633VX.js +2 -0
- package/dist/cdn/{ZLXN7NMF.js → FYZATVB3.js} +10 -8
- package/dist/cdn/{H7422XUG.js → GYVSHAUI.js} +1 -1
- package/dist/cdn/HBLRVXEB.js +2 -0
- package/dist/cdn/HJG7QM2R.js +9 -0
- package/dist/cdn/HQXPPYMD.js +2 -0
- package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
- package/dist/cdn/ICYUPLZM.js +56 -0
- package/dist/cdn/IEHPNCTL.js +2 -0
- package/dist/cdn/IHP25JWI.js +99 -0
- package/dist/cdn/J6A4AS7E.js +22 -0
- package/dist/cdn/{NE7E52YR.js → JEBRN3EU.js} +9 -3
- package/dist/cdn/JEL5M7FA.js +2 -0
- package/dist/cdn/{CXWBEDXN.js → JSIGEUX7.js} +6 -4
- package/dist/cdn/JSJ4RMOE.js +2 -0
- package/dist/cdn/JVYPIWEU.js +2 -0
- package/dist/cdn/KJJAXCP4.js +2 -0
- package/dist/cdn/LHLO6PTD.js +2 -0
- package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
- package/dist/cdn/LUY6V4TP.js +181 -0
- package/dist/cdn/M3MRIGDZ.js +2 -0
- package/dist/cdn/MS5EA2KY.js +2 -0
- package/dist/cdn/MWYBF3F3.js +66 -0
- package/dist/cdn/NAKAZDJ7.js +4 -0
- package/dist/cdn/NEV6OZN3.js +71 -0
- package/dist/cdn/O5TONDCH.js +2 -0
- package/dist/cdn/OC5GA5ZQ.js +3 -0
- package/dist/cdn/OGMMYFHR.js +2 -0
- package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
- package/dist/cdn/OYNIFMCJ.js +2 -0
- package/dist/cdn/PNFBQ6JV.js +180 -0
- package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
- package/dist/cdn/PVE7Q43N.js +2 -0
- package/dist/cdn/R74ZHFA6.js +2 -0
- package/dist/cdn/RLEHNAIA.js +2 -0
- package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
- package/dist/cdn/SJR4IR57.js +2 -0
- package/dist/cdn/SPVOBZAL.js +2 -0
- package/dist/cdn/SUA3YJTU.js +22 -0
- package/dist/cdn/T7DYMSJV.js +65 -0
- package/dist/cdn/TFT6HK3O.js +208 -0
- package/dist/cdn/THR22OXW.js +2 -0
- package/dist/cdn/TPULIO6I.js +34 -0
- package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
- package/dist/cdn/UK7PR2FE.js +2 -0
- package/dist/cdn/UZLQALHY.js +2 -0
- package/dist/cdn/V6HOUZPZ.js +2 -0
- package/dist/cdn/VAXH6RUQ.js +134 -0
- package/dist/cdn/VPFIUEKT.js +14 -0
- package/dist/cdn/VXFQANGJ.js +2 -0
- package/dist/cdn/XCRR2EEG.js +6 -0
- package/dist/cdn/YHQJ66WJ.js +2 -0
- package/dist/cdn/YYSMCB4A.js +2 -0
- package/dist/cdn/Z6I6JACX.js +3 -0
- package/dist/cdn/ZB57WYHC.js +2 -0
- package/dist/cdn/ZS6SXJP2.js +2 -0
- package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
- package/dist/cdn/agent-utils/index.js +2 -0
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +3 -0
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -0
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/adapter.js +1794 -1597
- package/dist/chunks/arcgisKnowledgeGraph.js +126 -71
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +19 -2
- package/dist/chunks/arcgis_knowledge_current_map_context.js +31 -2
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +116 -27
- package/dist/chunks/converterUtils.js +39 -32
- package/dist/chunks/dataExplorationGraph.js +139 -113
- package/dist/chunks/data_explore_query_prompt.js +9 -4
- package/dist/chunks/generateLayerDescriptions.js +248 -228
- package/dist/chunks/helpGraph.js +17 -13
- package/dist/chunks/help_prompt.js +34 -17
- package/dist/chunks/index.js +11 -0
- package/dist/chunks/intent_prompt.js +16 -0
- package/dist/chunks/layerStylingGraph.js +24 -20
- package/dist/chunks/navigationGraph.js +33 -28
- package/dist/chunks/navigation_intent_prompt.js +8 -2
- package/dist/chunks/orchestrator.js +110 -108
- package/dist/chunks/slottableRequestUtils.js +3 -7
- package/dist/chunks/state.js +1 -1
- package/dist/chunks/summarize_query_response_prompt.js +9 -7
- package/dist/chunks/toolCallResponse.js +12 -9
- package/dist/chunks/utils2.js +8 -8
- package/dist/components/arcgis-assistant/customElement.d.ts +27 -0
- package/dist/components/arcgis-assistant/customElement.js +385 -152
- package/dist/components/arcgis-assistant/index.js +2 -3
- package/dist/components/arcgis-assistant/types.d.ts +14 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +5 -1
- package/dist/components/arcgis-assistant-chat/customElement.d.ts +8 -2
- package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
- package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +25 -18
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +11 -5
- package/dist/components/arcgis-assistant-help-agent/customElement.js +8 -2
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.js +12 -8
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +20 -0
- package/dist/components/arcgis-assistant-interrupt-preview/index.js +2 -0
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +17 -11
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +10 -4
- package/dist/components/arcgis-assistant-message/customElement.d.ts +23 -0
- package/dist/components/arcgis-assistant-message/customElement.js +28 -26
- package/dist/components/arcgis-assistant-message/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-message/index.js +2 -0
- package/dist/components/arcgis-assistant-message-block/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +18 -11
- package/dist/components/arcgis-assistant-message-block/index.js +1 -0
- package/dist/components/arcgis-assistant-message-feedback/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +8 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +8 -8
- package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
- package/dist/components/arcgis-assistant-message-log/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +5 -1
- package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +11 -5
- package/dist/components/arcgis-assistant-speech-input/customElement.d.ts +6 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +8 -8
- package/dist/components/arcgis-assistant-user-message/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-user-message/customElement.js +10 -8
- 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/dist/index.d.ts +4 -0
- package/dist/loader.js +7 -6
- package/dist/oauth-callback.html +1 -1
- package/dist/types/lumina.d.ts +11 -5
- package/dist/types/preact.d.ts +12 -5
- package/dist/types/react.d.ts +13 -5
- package/dist/types/stencil.d.ts +11 -5
- package/dist/utils/index.d.ts +85 -47
- package/dist/utils/index.js +48 -47
- package/package.json +13 -12
- package/dist/cdn/2AXF774U.js +0 -2
- package/dist/cdn/3BKUCFKS.js +0 -36
- package/dist/cdn/3PKJWIC3.js +0 -2
- package/dist/cdn/3WINIQWY.js +0 -2
- package/dist/cdn/462JBSEV.js +0 -422
- package/dist/cdn/5QAHYX7Y.js +0 -5
- package/dist/cdn/7BCR6TUO.js +0 -2
- package/dist/cdn/7GH7VSB2.js +0 -2
- package/dist/cdn/7PLV4QH6.js +0 -2
- package/dist/cdn/AO7BQHKC.js +0 -2
- package/dist/cdn/AXDZBBNL.js +0 -45
- package/dist/cdn/DDLZOMUY.js +0 -2
- package/dist/cdn/DHOVCT6R.js +0 -2
- package/dist/cdn/DO2P3PWF.js +0 -106
- package/dist/cdn/ERBQSEPQ.js +0 -22
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/FX5JFRDL.js +0 -2
- package/dist/cdn/GBNUMN4J.js +0 -16
- package/dist/cdn/GJUXVEOF.js +0 -166
- package/dist/cdn/HB5A5R2E.js +0 -2
- package/dist/cdn/J5CMRCPS.js +0 -3
- package/dist/cdn/KMQ3SP4I.js +0 -5
- package/dist/cdn/M6F4MXDK.js +0 -14
- package/dist/cdn/MH5RPXHM.js +0 -2
- package/dist/cdn/NAUXSHIE.js +0 -72
- package/dist/cdn/NVI3I46B.js +0 -2
- package/dist/cdn/OAVEHGB6.js +0 -2
- package/dist/cdn/OH64RMOR.js +0 -4
- package/dist/cdn/P6OPJQMC.js +0 -3
- package/dist/cdn/QR54T33D.js +0 -2
- package/dist/cdn/RVOAPUBN.js +0 -2
- package/dist/cdn/SXDLXCIM.js +0 -2
- package/dist/cdn/USMDJUFS.js +0 -2
- package/dist/cdn/V2P4AIGG.js +0 -2
- package/dist/cdn/Y333DGV6.js +0 -2
- package/dist/cdn/YIMNOUTF.js +0 -2
package/dist/types/preact.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { ArcgisAssistantNavigationAgent } from "../components/arcgis-assist
|
|
|
9
9
|
import type { ArcgisAssistantChat } from "../components/arcgis-assistant-chat/customElement.js";
|
|
10
10
|
import type { ArcgisAssistantChatEntry } from "../components/arcgis-assistant-chat-entry/customElement.js";
|
|
11
11
|
import type { ArcgisAssistantInterrupt } from "../components/arcgis-assistant-interrupt/customElement.js";
|
|
12
|
+
import type { ArcgisAssistantMessage } from "../components/arcgis-assistant-message/customElement.js";
|
|
12
13
|
import type { ArcgisAssistantMessageBlock } from "../components/arcgis-assistant-message-block/customElement.js";
|
|
13
14
|
import type { ArcgisAssistantMessageFeedback } from "../components/arcgis-assistant-message-feedback/customElement.js";
|
|
14
15
|
import type { ArcgisAssistantMessageFooter } from "../components/arcgis-assistant-message-footer/customElement.js";
|
|
@@ -22,7 +23,7 @@ import type { ArcgisAssistantUserMessage } from "../components/arcgis-assistant-
|
|
|
22
23
|
import { HTMLAttributes } from "preact";
|
|
23
24
|
import type { EventHandler } from "@arcgis/lumina";
|
|
24
25
|
|
|
25
|
-
interface PreactArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "suggestedPrompts">>, HTMLAttributes<ArcgisAssistant> {
|
|
26
|
+
interface PreactArcgisAssistant extends Partial<Pick<ArcgisAssistant, "assistantAvatarEnabled" | "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "streamingDisabled" | "suggestedPrompts">>, HTMLAttributes<ArcgisAssistant> {
|
|
26
27
|
onarcgisCancel?: EventHandler<ArcgisAssistant["arcgisCancel"]>;
|
|
27
28
|
onarcgisError?: EventHandler<ArcgisAssistant["arcgisError"]>;
|
|
28
29
|
onarcgisFeedback?: EventHandler<ArcgisAssistant["arcgisFeedback"]>;
|
|
@@ -31,6 +32,7 @@ interface PreactArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnabl
|
|
|
31
32
|
onarcgisInterruptSubmit?: EventHandler<ArcgisAssistant["arcgisInterruptSubmit"]>;
|
|
32
33
|
onarcgisPromptSelect?: EventHandler<ArcgisAssistant["arcgisPromptSelect"]>;
|
|
33
34
|
onarcgisReady?: EventHandler<ArcgisAssistant["arcgisReady"]>;
|
|
35
|
+
onarcgisResponse?: EventHandler<ArcgisAssistant["arcgisResponse"]>;
|
|
34
36
|
onarcgisSlottableRequest?: EventHandler<ArcgisAssistant["arcgisSlottableRequest"]>;
|
|
35
37
|
onarcgisSubmit?: EventHandler<ArcgisAssistant["arcgisSubmit"]>;
|
|
36
38
|
}
|
|
@@ -53,10 +55,10 @@ interface PreactArcgisAssistantLayerStylingAgent extends Partial<Pick<ArcgisAssi
|
|
|
53
55
|
interface PreactArcgisAssistantNavigationAgent extends Partial<Pick<ArcgisAssistantNavigationAgent, "referenceElement">>, HTMLAttributes<ArcgisAssistantNavigationAgent> {
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
interface PreactArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "loading" | "messages">>, HTMLAttributes<ArcgisAssistantChat> {
|
|
58
|
+
interface PreactArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "interrupt" | "loading" | "messages">>, HTMLAttributes<ArcgisAssistantChat> {
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
interface PreactArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, HTMLAttributes<ArcgisAssistantChatEntry> {
|
|
61
|
+
interface PreactArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "disabled" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, HTMLAttributes<ArcgisAssistantChatEntry> {
|
|
60
62
|
onarcgisCancel?: EventHandler<ArcgisAssistantChatEntry["arcgisCancel"]>;
|
|
61
63
|
onarcgisSubmit?: EventHandler<ArcgisAssistantChatEntry["arcgisSubmit"]>;
|
|
62
64
|
}
|
|
@@ -66,6 +68,9 @@ interface PreactArcgisAssistantInterrupt extends Partial<Pick<ArcgisAssistantInt
|
|
|
66
68
|
onarcgisSubmit?: EventHandler<ArcgisAssistantInterrupt["arcgisSubmit"]>;
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
interface PreactArcgisAssistantMessage extends Partial<Pick<ArcgisAssistantMessage, "assistantAvatarEnabled" | "copyEnabled" | "feedbackEnabled" | "footerDisabled" | "logEnabled" | "message" | "readAloudEnabled">>, HTMLAttributes<ArcgisAssistantMessage> {
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
interface PreactArcgisAssistantMessageBlock extends Partial<Pick<ArcgisAssistantMessageBlock, "block">>, HTMLAttributes<ArcgisAssistantMessageBlock> {
|
|
70
75
|
}
|
|
71
76
|
|
|
@@ -76,7 +81,7 @@ interface PreactArcgisAssistantMessageFeedback extends Partial<Pick<ArcgisAssist
|
|
|
76
81
|
interface PreactArcgisAssistantMessageFooter extends Partial<Pick<ArcgisAssistantMessageFooter, "copyEnabled" | "feedbackEnabled" | "logEnabled" | "message" | "readAloudEnabled">>, HTMLAttributes<ArcgisAssistantMessageFooter> {
|
|
77
82
|
}
|
|
78
83
|
|
|
79
|
-
interface PreactArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "loading" | "loadingMessage">>, HTMLAttributes<ArcgisAssistantMessageLoading> {
|
|
84
|
+
interface PreactArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "assistantAvatarEnabled" | "interrupts" | "loading" | "loadingMessage">>, HTMLAttributes<ArcgisAssistantMessageLoading> {
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
interface PreactArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantMessageLog, "log" | "logEnabled" | "showLog">>, HTMLAttributes<ArcgisAssistantMessageLog> {
|
|
@@ -85,7 +90,7 @@ interface PreactArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantMe
|
|
|
85
90
|
interface PreactArcgisAssistantMessageReadAloud extends Partial<Pick<ArcgisAssistantMessageReadAloud, "message" | "readAloudEnabled">>, HTMLAttributes<ArcgisAssistantMessageReadAloud> {
|
|
86
91
|
}
|
|
87
92
|
|
|
88
|
-
interface PreactArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content">>, HTMLAttributes<ArcgisAssistantMessageText> {
|
|
93
|
+
interface PreactArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content" | "parts">>, HTMLAttributes<ArcgisAssistantMessageText> {
|
|
89
94
|
}
|
|
90
95
|
|
|
91
96
|
interface PreactArcgisAssistantSpeechInput extends Partial<Pick<ArcgisAssistantSpeechInput, "awaitingResponse" | "inputValue" | "language" | "mode">>, HTMLAttributes<ArcgisAssistantSpeechInput> {
|
|
@@ -118,6 +123,7 @@ declare module 'preact' {
|
|
|
118
123
|
"arcgis-assistant-chat": PreactArcgisAssistantChat;
|
|
119
124
|
"arcgis-assistant-chat-entry": PreactArcgisAssistantChatEntry;
|
|
120
125
|
"arcgis-assistant-interrupt": PreactArcgisAssistantInterrupt;
|
|
126
|
+
"arcgis-assistant-message": PreactArcgisAssistantMessage;
|
|
121
127
|
"arcgis-assistant-message-block": PreactArcgisAssistantMessageBlock;
|
|
122
128
|
"arcgis-assistant-message-feedback": PreactArcgisAssistantMessageFeedback;
|
|
123
129
|
"arcgis-assistant-message-footer": PreactArcgisAssistantMessageFooter;
|
|
@@ -142,6 +148,7 @@ declare module 'preact' {
|
|
|
142
148
|
"arcgis-assistant-chat": PreactArcgisAssistantChat;
|
|
143
149
|
"arcgis-assistant-chat-entry": PreactArcgisAssistantChatEntry;
|
|
144
150
|
"arcgis-assistant-interrupt": PreactArcgisAssistantInterrupt;
|
|
151
|
+
"arcgis-assistant-message": PreactArcgisAssistantMessage;
|
|
145
152
|
"arcgis-assistant-message-block": PreactArcgisAssistantMessageBlock;
|
|
146
153
|
"arcgis-assistant-message-feedback": PreactArcgisAssistantMessageFeedback;
|
|
147
154
|
"arcgis-assistant-message-footer": PreactArcgisAssistantMessageFooter;
|
package/dist/types/react.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { ArcgisAssistantNavigationAgent } from "../components/arcgis-assist
|
|
|
9
9
|
import type { ArcgisAssistantChat } from "../components/arcgis-assistant-chat/customElement.js";
|
|
10
10
|
import type { ArcgisAssistantChatEntry } from "../components/arcgis-assistant-chat-entry/customElement.js";
|
|
11
11
|
import type { ArcgisAssistantInterrupt } from "../components/arcgis-assistant-interrupt/customElement.js";
|
|
12
|
+
import type { ArcgisAssistantMessage } from "../components/arcgis-assistant-message/customElement.js";
|
|
12
13
|
import type { ArcgisAssistantMessageBlock } from "../components/arcgis-assistant-message-block/customElement.js";
|
|
13
14
|
import type { ArcgisAssistantMessageFeedback } from "../components/arcgis-assistant-message-feedback/customElement.js";
|
|
14
15
|
import type { ArcgisAssistantMessageFooter } from "../components/arcgis-assistant-message-footer/customElement.js";
|
|
@@ -22,7 +23,7 @@ import type { ArcgisAssistantUserMessage } from "../components/arcgis-assistant-
|
|
|
22
23
|
import type { HTMLProps } from 'react';
|
|
23
24
|
import type { EventHandler } from "@arcgis/lumina";
|
|
24
25
|
|
|
25
|
-
interface ReactArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "suggestedPrompts">>, HTMLProps<ArcgisAssistant> {
|
|
26
|
+
interface ReactArcgisAssistant extends Partial<Pick<ArcgisAssistant, "assistantAvatarEnabled" | "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "streamingDisabled" | "suggestedPrompts">>, HTMLProps<ArcgisAssistant> {
|
|
26
27
|
onarcgisCancel?: EventHandler<ArcgisAssistant["arcgisCancel"]>;
|
|
27
28
|
onarcgisError?: EventHandler<ArcgisAssistant["arcgisError"]>;
|
|
28
29
|
onarcgisFeedback?: EventHandler<ArcgisAssistant["arcgisFeedback"]>;
|
|
@@ -31,6 +32,7 @@ interface ReactArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnable
|
|
|
31
32
|
onarcgisInterruptSubmit?: EventHandler<ArcgisAssistant["arcgisInterruptSubmit"]>;
|
|
32
33
|
onarcgisPromptSelect?: EventHandler<ArcgisAssistant["arcgisPromptSelect"]>;
|
|
33
34
|
onarcgisReady?: EventHandler<ArcgisAssistant["arcgisReady"]>;
|
|
35
|
+
onarcgisResponse?: EventHandler<ArcgisAssistant["arcgisResponse"]>;
|
|
34
36
|
onarcgisSlottableRequest?: EventHandler<ArcgisAssistant["arcgisSlottableRequest"]>;
|
|
35
37
|
onarcgisSubmit?: EventHandler<ArcgisAssistant["arcgisSubmit"]>;
|
|
36
38
|
}
|
|
@@ -53,10 +55,10 @@ interface ReactArcgisAssistantLayerStylingAgent extends Partial<Pick<ArcgisAssis
|
|
|
53
55
|
interface ReactArcgisAssistantNavigationAgent extends Partial<Pick<ArcgisAssistantNavigationAgent, "referenceElement">>, HTMLProps<ArcgisAssistantNavigationAgent> {
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
interface ReactArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "loading" | "messages">>, HTMLProps<ArcgisAssistantChat> {
|
|
58
|
+
interface ReactArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "interrupt" | "loading" | "messages">>, HTMLProps<ArcgisAssistantChat> {
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
interface ReactArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, HTMLProps<ArcgisAssistantChatEntry> {
|
|
61
|
+
interface ReactArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "disabled" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, HTMLProps<ArcgisAssistantChatEntry> {
|
|
60
62
|
onarcgisCancel?: EventHandler<ArcgisAssistantChatEntry["arcgisCancel"]>;
|
|
61
63
|
onarcgisSubmit?: EventHandler<ArcgisAssistantChatEntry["arcgisSubmit"]>;
|
|
62
64
|
}
|
|
@@ -66,6 +68,9 @@ interface ReactArcgisAssistantInterrupt extends Partial<Pick<ArcgisAssistantInte
|
|
|
66
68
|
onarcgisSubmit?: EventHandler<ArcgisAssistantInterrupt["arcgisSubmit"]>;
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
interface ReactArcgisAssistantMessage extends Partial<Pick<ArcgisAssistantMessage, "assistantAvatarEnabled" | "copyEnabled" | "feedbackEnabled" | "footerDisabled" | "logEnabled" | "message" | "readAloudEnabled">>, HTMLProps<ArcgisAssistantMessage> {
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
interface ReactArcgisAssistantMessageBlock extends Partial<Pick<ArcgisAssistantMessageBlock, "block">>, HTMLProps<ArcgisAssistantMessageBlock> {
|
|
70
75
|
}
|
|
71
76
|
|
|
@@ -76,7 +81,7 @@ interface ReactArcgisAssistantMessageFeedback extends Partial<Pick<ArcgisAssista
|
|
|
76
81
|
interface ReactArcgisAssistantMessageFooter extends Partial<Pick<ArcgisAssistantMessageFooter, "copyEnabled" | "feedbackEnabled" | "logEnabled" | "message" | "readAloudEnabled">>, HTMLProps<ArcgisAssistantMessageFooter> {
|
|
77
82
|
}
|
|
78
83
|
|
|
79
|
-
interface ReactArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "loading" | "loadingMessage">>, HTMLProps<ArcgisAssistantMessageLoading> {
|
|
84
|
+
interface ReactArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "assistantAvatarEnabled" | "interrupts" | "loading" | "loadingMessage">>, HTMLProps<ArcgisAssistantMessageLoading> {
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
interface ReactArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantMessageLog, "log" | "logEnabled" | "showLog">>, HTMLProps<ArcgisAssistantMessageLog> {
|
|
@@ -85,7 +90,7 @@ interface ReactArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantMes
|
|
|
85
90
|
interface ReactArcgisAssistantMessageReadAloud extends Partial<Pick<ArcgisAssistantMessageReadAloud, "message" | "readAloudEnabled">>, HTMLProps<ArcgisAssistantMessageReadAloud> {
|
|
86
91
|
}
|
|
87
92
|
|
|
88
|
-
interface ReactArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content">>, HTMLProps<ArcgisAssistantMessageText> {
|
|
93
|
+
interface ReactArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content" | "parts">>, HTMLProps<ArcgisAssistantMessageText> {
|
|
89
94
|
}
|
|
90
95
|
|
|
91
96
|
interface ReactArcgisAssistantSpeechInput extends Partial<Pick<ArcgisAssistantSpeechInput, "awaitingResponse" | "inputValue" | "language" | "mode">>, HTMLProps<ArcgisAssistantSpeechInput> {
|
|
@@ -118,6 +123,7 @@ declare module "react" {
|
|
|
118
123
|
"arcgis-assistant-chat": ReactArcgisAssistantChat;
|
|
119
124
|
"arcgis-assistant-chat-entry": ReactArcgisAssistantChatEntry;
|
|
120
125
|
"arcgis-assistant-interrupt": ReactArcgisAssistantInterrupt;
|
|
126
|
+
"arcgis-assistant-message": ReactArcgisAssistantMessage;
|
|
121
127
|
"arcgis-assistant-message-block": ReactArcgisAssistantMessageBlock;
|
|
122
128
|
"arcgis-assistant-message-feedback": ReactArcgisAssistantMessageFeedback;
|
|
123
129
|
"arcgis-assistant-message-footer": ReactArcgisAssistantMessageFooter;
|
|
@@ -144,6 +150,7 @@ declare module "react/jsx-runtime" {
|
|
|
144
150
|
"arcgis-assistant-chat": ReactArcgisAssistantChat;
|
|
145
151
|
"arcgis-assistant-chat-entry": ReactArcgisAssistantChatEntry;
|
|
146
152
|
"arcgis-assistant-interrupt": ReactArcgisAssistantInterrupt;
|
|
153
|
+
"arcgis-assistant-message": ReactArcgisAssistantMessage;
|
|
147
154
|
"arcgis-assistant-message-block": ReactArcgisAssistantMessageBlock;
|
|
148
155
|
"arcgis-assistant-message-feedback": ReactArcgisAssistantMessageFeedback;
|
|
149
156
|
"arcgis-assistant-message-footer": ReactArcgisAssistantMessageFooter;
|
|
@@ -170,6 +177,7 @@ declare module "react/jsx-dev-runtime" {
|
|
|
170
177
|
"arcgis-assistant-chat": ReactArcgisAssistantChat;
|
|
171
178
|
"arcgis-assistant-chat-entry": ReactArcgisAssistantChatEntry;
|
|
172
179
|
"arcgis-assistant-interrupt": ReactArcgisAssistantInterrupt;
|
|
180
|
+
"arcgis-assistant-message": ReactArcgisAssistantMessage;
|
|
173
181
|
"arcgis-assistant-message-block": ReactArcgisAssistantMessageBlock;
|
|
174
182
|
"arcgis-assistant-message-feedback": ReactArcgisAssistantMessageFeedback;
|
|
175
183
|
"arcgis-assistant-message-footer": ReactArcgisAssistantMessageFooter;
|
package/dist/types/stencil.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { ArcgisAssistantNavigationAgent } from "../components/arcgis-assist
|
|
|
9
9
|
import type { ArcgisAssistantChat } from "../components/arcgis-assistant-chat/customElement.js";
|
|
10
10
|
import type { ArcgisAssistantChatEntry } from "../components/arcgis-assistant-chat-entry/customElement.js";
|
|
11
11
|
import type { ArcgisAssistantInterrupt } from "../components/arcgis-assistant-interrupt/customElement.js";
|
|
12
|
+
import type { ArcgisAssistantMessage } from "../components/arcgis-assistant-message/customElement.js";
|
|
12
13
|
import type { ArcgisAssistantMessageBlock } from "../components/arcgis-assistant-message-block/customElement.js";
|
|
13
14
|
import type { ArcgisAssistantMessageFeedback } from "../components/arcgis-assistant-message-feedback/customElement.js";
|
|
14
15
|
import type { ArcgisAssistantMessageFooter } from "../components/arcgis-assistant-message-footer/customElement.js";
|
|
@@ -22,7 +23,7 @@ import type { ArcgisAssistantUserMessage } from "../components/arcgis-assistant-
|
|
|
22
23
|
import { JSXBase as StencilJsx } from "@stencil/core/internal";
|
|
23
24
|
import type { EventHandler } from "@arcgis/lumina";
|
|
24
25
|
|
|
25
|
-
interface StencilArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "suggestedPrompts">>, StencilJsx.HTMLAttributes<ArcgisAssistant> {
|
|
26
|
+
interface StencilArcgisAssistant extends Partial<Pick<ArcgisAssistant, "assistantAvatarEnabled" | "copyEnabled" | "description" | "entryMessage" | "feedbackEnabled" | "heading" | "keepSuggestedPrompts" | "logEnabled" | "messages" | "referenceElement" | "streamingDisabled" | "suggestedPrompts">>, StencilJsx.HTMLAttributes<ArcgisAssistant> {
|
|
26
27
|
onArcgisCancel?: EventHandler<ArcgisAssistant["arcgisCancel"]>;
|
|
27
28
|
onArcgisError?: EventHandler<ArcgisAssistant["arcgisError"]>;
|
|
28
29
|
onArcgisFeedback?: EventHandler<ArcgisAssistant["arcgisFeedback"]>;
|
|
@@ -31,6 +32,7 @@ interface StencilArcgisAssistant extends Partial<Pick<ArcgisAssistant, "copyEnab
|
|
|
31
32
|
onArcgisInterruptSubmit?: EventHandler<ArcgisAssistant["arcgisInterruptSubmit"]>;
|
|
32
33
|
onArcgisPromptSelect?: EventHandler<ArcgisAssistant["arcgisPromptSelect"]>;
|
|
33
34
|
onArcgisReady?: EventHandler<ArcgisAssistant["arcgisReady"]>;
|
|
35
|
+
onArcgisResponse?: EventHandler<ArcgisAssistant["arcgisResponse"]>;
|
|
34
36
|
onArcgisSlottableRequest?: EventHandler<ArcgisAssistant["arcgisSlottableRequest"]>;
|
|
35
37
|
onArcgisSubmit?: EventHandler<ArcgisAssistant["arcgisSubmit"]>;
|
|
36
38
|
}
|
|
@@ -53,10 +55,10 @@ interface StencilArcgisAssistantLayerStylingAgent extends Partial<Pick<ArcgisAss
|
|
|
53
55
|
interface StencilArcgisAssistantNavigationAgent extends Partial<Pick<ArcgisAssistantNavigationAgent, "referenceElement">>, StencilJsx.HTMLAttributes<ArcgisAssistantNavigationAgent> {
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
interface StencilArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "loading" | "messages">>, StencilJsx.HTMLAttributes<ArcgisAssistantChat> {
|
|
58
|
+
interface StencilArcgisAssistantChat extends Partial<Pick<ArcgisAssistantChat, "interrupt" | "loading" | "messages">>, StencilJsx.HTMLAttributes<ArcgisAssistantChat> {
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
interface StencilArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantChatEntry> {
|
|
61
|
+
interface StencilArcgisAssistantChatEntry extends Partial<Pick<ArcgisAssistantChatEntry, "awaitingResponse" | "disabled" | "entryPlaceholder" | "inputValue" | "keyboardShortcutsDisabled" | "messages" | "status" | "voiceInputEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantChatEntry> {
|
|
60
62
|
onArcgisCancel?: EventHandler<ArcgisAssistantChatEntry["arcgisCancel"]>;
|
|
61
63
|
onArcgisSubmit?: EventHandler<ArcgisAssistantChatEntry["arcgisSubmit"]>;
|
|
62
64
|
}
|
|
@@ -66,6 +68,9 @@ interface StencilArcgisAssistantInterrupt extends Partial<Pick<ArcgisAssistantIn
|
|
|
66
68
|
onArcgisSubmit?: EventHandler<ArcgisAssistantInterrupt["arcgisSubmit"]>;
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
interface StencilArcgisAssistantMessage extends Partial<Pick<ArcgisAssistantMessage, "assistantAvatarEnabled" | "copyEnabled" | "feedbackEnabled" | "footerDisabled" | "logEnabled" | "message" | "readAloudEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessage> {
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
interface StencilArcgisAssistantMessageBlock extends Partial<Pick<ArcgisAssistantMessageBlock, "block">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageBlock> {
|
|
70
75
|
}
|
|
71
76
|
|
|
@@ -76,7 +81,7 @@ interface StencilArcgisAssistantMessageFeedback extends Partial<Pick<ArcgisAssis
|
|
|
76
81
|
interface StencilArcgisAssistantMessageFooter extends Partial<Pick<ArcgisAssistantMessageFooter, "copyEnabled" | "feedbackEnabled" | "logEnabled" | "message" | "readAloudEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageFooter> {
|
|
77
82
|
}
|
|
78
83
|
|
|
79
|
-
interface StencilArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "loading" | "loadingMessage">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageLoading> {
|
|
84
|
+
interface StencilArcgisAssistantMessageLoading extends Partial<Pick<ArcgisAssistantMessageLoading, "assistantAvatarEnabled" | "interrupts" | "loading" | "loadingMessage">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageLoading> {
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
interface StencilArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantMessageLog, "log" | "logEnabled" | "showLog">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageLog> {
|
|
@@ -85,7 +90,7 @@ interface StencilArcgisAssistantMessageLog extends Partial<Pick<ArcgisAssistantM
|
|
|
85
90
|
interface StencilArcgisAssistantMessageReadAloud extends Partial<Pick<ArcgisAssistantMessageReadAloud, "message" | "readAloudEnabled">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageReadAloud> {
|
|
86
91
|
}
|
|
87
92
|
|
|
88
|
-
interface StencilArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageText> {
|
|
93
|
+
interface StencilArcgisAssistantMessageText extends Partial<Pick<ArcgisAssistantMessageText, "content" | "parts">>, StencilJsx.HTMLAttributes<ArcgisAssistantMessageText> {
|
|
89
94
|
}
|
|
90
95
|
|
|
91
96
|
interface StencilArcgisAssistantSpeechInput extends Partial<Pick<ArcgisAssistantSpeechInput, "awaitingResponse" | "inputValue" | "language" | "mode">>, StencilJsx.HTMLAttributes<ArcgisAssistantSpeechInput> {
|
|
@@ -116,6 +121,7 @@ interface ExposedElements {
|
|
|
116
121
|
"arcgis-assistant-chat": StencilArcgisAssistantChat;
|
|
117
122
|
"arcgis-assistant-chat-entry": StencilArcgisAssistantChatEntry;
|
|
118
123
|
"arcgis-assistant-interrupt": StencilArcgisAssistantInterrupt;
|
|
124
|
+
"arcgis-assistant-message": StencilArcgisAssistantMessage;
|
|
119
125
|
"arcgis-assistant-message-block": StencilArcgisAssistantMessageBlock;
|
|
120
126
|
"arcgis-assistant-message-feedback": StencilArcgisAssistantMessageFeedback;
|
|
121
127
|
"arcgis-assistant-message-footer": StencilArcgisAssistantMessageFooter;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -8,8 +8,11 @@ import type { AnnotationRoot, BaseChannel, StateGraph } from "@langchain/langgra
|
|
|
8
8
|
import type { ChatOpenAI } from "@langchain/openai";
|
|
9
9
|
import type { ZodType } from "zod";
|
|
10
10
|
|
|
11
|
-
export { type CustomConfigurableType } from "../orchestrator";
|
|
12
|
-
export { Orchestrator } from "../orchestrator";
|
|
11
|
+
export { type CustomConfigurableType } from "../orchestrator.js";
|
|
12
|
+
export { Orchestrator } from "../orchestrator.js";
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type ChatModelTier = "advanced" | "default" | "fast";
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* Represents the chat message history between the user and the assistant, including all messages sent and received during the conversation.
|
|
@@ -146,6 +149,8 @@ export type ArcgisPromptOptions = {
|
|
|
146
149
|
* - `advanced` - An advanced model tier that may provide improved accuracy or capabilities compared to
|
|
147
150
|
* the default tier. However, it may also come with increased cost and slower performance. At
|
|
148
151
|
* JS SDK v5.0, this model tier corresponds to GPT-5.2 model.
|
|
152
|
+
* - `fast` - A lower cost model suitable for tasks like classification and summarization. This tier may have limitations in terms of response length and complexity.
|
|
153
|
+
* New at JS SDK v5.1, this model tier corresponds to GPT-5.4-nano model.
|
|
149
154
|
*
|
|
150
155
|
* The specific models available in each tier may evolve over time as new models are released and existing
|
|
151
156
|
* models are retired. The dates models are retired depends on the model provider and therefore may not
|
|
@@ -172,8 +177,8 @@ export type ArcgisPromptOptions = {
|
|
|
172
177
|
* and produce more accurate and relevant responses.
|
|
173
178
|
*/
|
|
174
179
|
messages?: ChatHistory;
|
|
175
|
-
/**
|
|
176
|
-
|
|
180
|
+
/** Optional runnable configuration used to derive runtime values (for example, conversation id and abort signal). */
|
|
181
|
+
config?: RunnableConfig;
|
|
177
182
|
/**
|
|
178
183
|
* Input variables for the prompt. This can include any relevant variables related to the context
|
|
179
184
|
* provided to the agent. This may be necessary for determining tool parameters or for providing additional
|
|
@@ -321,7 +326,7 @@ export function cosineSimilarity(vectorA: number[], vectorB: number[]): number;
|
|
|
321
326
|
/**
|
|
322
327
|
* The suggestions emitted by the agent to the user interface.
|
|
323
328
|
*
|
|
324
|
-
* @
|
|
329
|
+
* @since 5.1
|
|
325
330
|
*/
|
|
326
331
|
export type UXSuggestion = {
|
|
327
332
|
/** The type of suggestion being made. */
|
|
@@ -333,32 +338,41 @@ export type UXSuggestion = {
|
|
|
333
338
|
/**
|
|
334
339
|
* Execution status returned by an agent run.
|
|
335
340
|
*
|
|
336
|
-
* @
|
|
341
|
+
* @since 5.1
|
|
337
342
|
*/
|
|
338
343
|
export type AgentStatus = "failed" | "success" | "unknown";
|
|
339
344
|
|
|
340
345
|
/**
|
|
341
346
|
* Summary of a previously executed agent step.
|
|
342
347
|
*
|
|
343
|
-
* @
|
|
348
|
+
* @since 5.1
|
|
344
349
|
*/
|
|
345
350
|
export interface PriorStep {
|
|
351
|
+
/** The agent that handled the step. */
|
|
346
352
|
agentId: string;
|
|
353
|
+
/** The task assigned to the agent for this step. */
|
|
347
354
|
assignedTask: string;
|
|
355
|
+
/** A brief summary of the step's execution. */
|
|
348
356
|
summary: string;
|
|
357
|
+
/** The execution status of the step. */
|
|
349
358
|
status: AgentStatus;
|
|
350
359
|
}
|
|
351
360
|
|
|
352
361
|
/**
|
|
353
362
|
* Runtime execution context available to agent graph nodes and tools.
|
|
354
363
|
*
|
|
355
|
-
* @
|
|
364
|
+
* @since 5.1
|
|
356
365
|
*/
|
|
357
366
|
export interface AgentExecutionContext<TState extends Record<string, unknown> = Record<string, unknown>> {
|
|
367
|
+
/** The user's original request. */
|
|
358
368
|
userRequest: string;
|
|
369
|
+
/** The task assigned to the agent. */
|
|
359
370
|
assignedTask: string;
|
|
371
|
+
/** The message history for the run */
|
|
360
372
|
messages: ChatHistory;
|
|
373
|
+
/** Previous steps */
|
|
361
374
|
priorSteps: PriorStep[];
|
|
375
|
+
/** Shared state available to the agent. */
|
|
362
376
|
sharedState: SharedState<TState>;
|
|
363
377
|
}
|
|
364
378
|
|
|
@@ -429,6 +443,9 @@ export const createWebmapEmbeddings: (mapView: MapView) => Promise<{
|
|
|
429
443
|
}>;
|
|
430
444
|
}>;
|
|
431
445
|
|
|
446
|
+
/** @internal */
|
|
447
|
+
export type GetContext<TContext extends Record<string, unknown>> = () => Promise<TContext> | TContext;
|
|
448
|
+
|
|
432
449
|
/** @internal */
|
|
433
450
|
export interface AgentWithContext<TContext extends Record<string, unknown> = Record<string, unknown>> {
|
|
434
451
|
agent: AgentRegistration;
|
|
@@ -440,37 +457,9 @@ export interface AgentWithContext<TContext extends Record<string, unknown> = Rec
|
|
|
440
457
|
}
|
|
441
458
|
|
|
442
459
|
/** @internal */
|
|
443
|
-
export
|
|
444
|
-
|
|
445
|
-
/** @internal */
|
|
446
|
-
export function createAgentRuntimeStateWithSharedState<TState extends Record<string, unknown> = Record<string, unknown>>(): StatefulAgentBaseState<TState>;
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* @param suggestion
|
|
450
|
-
* @param config
|
|
451
|
-
* @internal
|
|
452
|
-
*/
|
|
453
|
-
export function sendUXSuggestion(suggestion: UXSuggestion, config?: RunnableConfig): Promise<void>;
|
|
460
|
+
export type AgentExecutionContextWithSharedState<TState extends Record<string, unknown> = Record<string, unknown>> = AgentExecutionContext<TState>;
|
|
454
461
|
|
|
455
462
|
/** @internal */
|
|
456
|
-
export type SharedStatePatch<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
457
|
-
[K in keyof T]?: SharedStatePatchEntry<T[K]>;
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* @param parameter0
|
|
462
|
-
* @internal
|
|
463
|
-
*/
|
|
464
|
-
export function createChatModel(parameter0?: {
|
|
465
|
-
modelTier?: ChatModelTier;
|
|
466
|
-
temperature?: number;
|
|
467
|
-
abortSignal?: AbortSignal;
|
|
468
|
-
}): Promise<ChatOpenAI>;
|
|
469
|
-
|
|
470
|
-
export type ChatModelTier = "advanced" | "default" | "fast";
|
|
471
|
-
|
|
472
|
-
export type GetContext<TContext extends Record<string, unknown>> = () => Promise<TContext> | TContext;
|
|
473
|
-
|
|
474
463
|
export type StatelessAgentBaseState<TState extends Record<string, unknown> = Record<string, unknown>> = {
|
|
475
464
|
agentExecutionContext: BaseChannel<AgentExecutionContextWithSharedState<TState>, unknown, unknown>;
|
|
476
465
|
outputMessage: BaseChannel<string, unknown, unknown>;
|
|
@@ -478,27 +467,76 @@ export type StatelessAgentBaseState<TState extends Record<string, unknown> = Rec
|
|
|
478
467
|
status: BaseChannel<AgentStatus | undefined, unknown, unknown>;
|
|
479
468
|
};
|
|
480
469
|
|
|
470
|
+
/** @internal */
|
|
481
471
|
export type StatefulAgentBaseState<TState extends Record<string, unknown> = Record<string, unknown>> = StatelessAgentBaseState<TState>
|
|
482
472
|
& {
|
|
483
473
|
sharedStatePatch: BaseChannel<SharedStatePatch<TState> | undefined, unknown, unknown>;
|
|
484
474
|
};
|
|
485
475
|
|
|
486
|
-
/**
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
476
|
+
/**
|
|
477
|
+
* Creates the standard runtime state for a custom agent graph.
|
|
478
|
+
* Includes common fields used by the assistant flow (request context, output message, summary, and status), so you only add your agent-specific state.
|
|
479
|
+
*
|
|
480
|
+
* @since 5.1
|
|
481
|
+
*/
|
|
482
|
+
export function createAgentRuntimeState<TState extends Record<string, unknown> = Record<string, unknown>>(): StatelessAgentBaseState<TState>;
|
|
490
483
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
484
|
+
/**
|
|
485
|
+
* Creates the standard runtime state for a custom agent graph, plus support for shared state updates.
|
|
486
|
+
* Use this when your agent needs to write values that other agents can read later in the same orchestration flow.
|
|
487
|
+
*
|
|
488
|
+
* @since 5.1
|
|
489
|
+
*/
|
|
490
|
+
export function createAgentRuntimeStateWithSharedState<TState extends Record<string, unknown> = Record<string, unknown>>(): StatefulAgentBaseState<TState>;
|
|
494
491
|
|
|
495
|
-
|
|
492
|
+
/**
|
|
493
|
+
* Sends an optional UX suggestion from an agent run to the host application.
|
|
494
|
+
* Use this for non-blocking hints (for example, recommended next actions or UI prompts) that the app may choose to display.
|
|
495
|
+
*
|
|
496
|
+
* @param suggestion
|
|
497
|
+
* @param config
|
|
498
|
+
* @since 5.1
|
|
499
|
+
*/
|
|
500
|
+
export function sendUXSuggestion(suggestion: UXSuggestion, config?: RunnableConfig): Promise<void>;
|
|
496
501
|
|
|
497
|
-
/**
|
|
502
|
+
/** @internal */
|
|
498
503
|
export type SharedStateEntry<T = unknown> = {
|
|
499
504
|
value: T;
|
|
500
505
|
meta: {
|
|
501
506
|
updatedByAgentId: string;
|
|
502
507
|
updatedAt: number;
|
|
503
508
|
};
|
|
504
|
-
};
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
/** @internal */
|
|
512
|
+
export type SharedStatePatchEntry<T = unknown> = {
|
|
513
|
+
value: T;
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Shared state that can be read and updated during agent execution.
|
|
518
|
+
*
|
|
519
|
+
* @since 5.1
|
|
520
|
+
*/
|
|
521
|
+
export type SharedState<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
522
|
+
[K in keyof T]?: SharedStateEntry<T[K]>;
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Partial shared state returned by an agent for merging into the current run state.
|
|
527
|
+
*
|
|
528
|
+
* @since 5.1
|
|
529
|
+
*/
|
|
530
|
+
export type SharedStatePatch<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
531
|
+
[K in keyof T]?: SharedStatePatchEntry<T[K]>;
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* @param parameter0
|
|
536
|
+
* @internal
|
|
537
|
+
*/
|
|
538
|
+
export function createChatModel(parameter0?: {
|
|
539
|
+
modelTier?: ChatModelTier;
|
|
540
|
+
temperature?: number;
|
|
541
|
+
config?: RunnableConfig;
|
|
542
|
+
}): Promise<ChatOpenAI>;
|
package/dist/utils/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { g as p } from "../chunks/orchestrator.js";
|
|
3
|
-
import { O as
|
|
4
|
-
import {
|
|
3
|
+
import { O as ue } from "../chunks/orchestrator.js";
|
|
4
|
+
import { s as h, a as A } from "../chunks/index.js";
|
|
5
|
+
import { g as S, a as v, W as w, f, l as y, d as $, m as b, b as E, s as L, i as P, e as M, h as T, j as R, k, c as x } from "../chunks/generateLayerDescriptions.js";
|
|
5
6
|
import D from "@arcgis/core/layers/FeatureLayer.js";
|
|
6
7
|
import * as W from "@arcgis/core/core/reactiveUtils.js";
|
|
7
8
|
import { N as F } from "../chunks/navigationGraph.js";
|
|
@@ -10,38 +11,38 @@ import { D as N } from "../chunks/dataExplorationGraph.js";
|
|
|
10
11
|
import { H as z } from "../chunks/helpGraph.js";
|
|
11
12
|
import { A as H } from "../chunks/arcgisKnowledgeGraph.js";
|
|
12
13
|
const I = async (e) => {
|
|
13
|
-
const t = e.allLayers.toArray(), s = [],
|
|
14
|
+
const t = e.allLayers.toArray(), s = [], o = /* @__PURE__ */ new Map();
|
|
14
15
|
for (const a of t)
|
|
15
16
|
if (a instanceof D) {
|
|
16
17
|
const m = (async () => {
|
|
17
|
-
const
|
|
18
|
-
|
|
18
|
+
const r = await S(a), n = await v(a, r);
|
|
19
|
+
o.set(a.id, { layerItem: n, fieldRegistry: r });
|
|
19
20
|
})();
|
|
20
21
|
s.push(m);
|
|
21
22
|
}
|
|
22
|
-
return await Promise.all(s),
|
|
23
|
+
return await Promise.all(s), o;
|
|
23
24
|
}, O = async (e) => {
|
|
24
25
|
await W.whenOnce(() => e.ready);
|
|
25
|
-
const t = await I(e.map), { layers: s } = await U(t),
|
|
26
|
-
schemaVersion:
|
|
26
|
+
const t = await I(e.map), { layers: s } = await U(t), o = {
|
|
27
|
+
schemaVersion: L,
|
|
27
28
|
modified: Date.now(),
|
|
28
29
|
embeddings: {
|
|
29
|
-
modelProvider:
|
|
30
|
-
model:
|
|
31
|
-
dimensions:
|
|
30
|
+
modelProvider: E,
|
|
31
|
+
model: b,
|
|
32
|
+
dimensions: $,
|
|
32
33
|
templates: {
|
|
33
34
|
layer: y,
|
|
34
35
|
field: f
|
|
35
36
|
}
|
|
36
37
|
},
|
|
37
38
|
layers: s
|
|
38
|
-
}, a =
|
|
39
|
+
}, a = w.safeParse(o);
|
|
39
40
|
if (!a.success)
|
|
40
41
|
throw console.error("Schema Mismatch:", a.error.format()), new Error("Webmap embedding generation failed validation.");
|
|
41
42
|
return a.data;
|
|
42
43
|
}, U = async (e) => {
|
|
43
44
|
const t = [], s = [];
|
|
44
|
-
for (const [
|
|
45
|
+
for (const [r, { fieldRegistry: n, layerItem: i }] of e.entries()) {
|
|
45
46
|
const l = g(y, {
|
|
46
47
|
name: i.name,
|
|
47
48
|
title: i.title,
|
|
@@ -49,14 +50,14 @@ const I = async (e) => {
|
|
|
49
50
|
});
|
|
50
51
|
t.push(l);
|
|
51
52
|
const d = {
|
|
52
|
-
id:
|
|
53
|
+
id: r,
|
|
53
54
|
name: i.name ?? "",
|
|
54
55
|
title: i.title,
|
|
55
56
|
description: i.description,
|
|
56
57
|
vector: [],
|
|
57
58
|
fields: []
|
|
58
59
|
};
|
|
59
|
-
for (const [, c] of
|
|
60
|
+
for (const [, c] of n.entries()) {
|
|
60
61
|
const u = g(f, {
|
|
61
62
|
name: c.name,
|
|
62
63
|
alias: c.alias,
|
|
@@ -71,45 +72,45 @@ const I = async (e) => {
|
|
|
71
72
|
}
|
|
72
73
|
s.push(d);
|
|
73
74
|
}
|
|
74
|
-
const
|
|
75
|
+
const o = await p(t);
|
|
75
76
|
let a = 0;
|
|
76
|
-
return { layers: s.map((
|
|
77
|
-
|
|
78
|
-
}),
|
|
79
|
-
}, g = (e, t) => e.replace(/\{(\w+)\}/gu, (s,
|
|
77
|
+
return { layers: s.map((r) => (r.vector = o[a++], r.fields.forEach((n) => {
|
|
78
|
+
n.vector = o[a++];
|
|
79
|
+
}), r)) };
|
|
80
|
+
}, g = (e, t) => e.replace(/\{(\w+)\}/gu, (s, o) => t[o] ?? ""), V = (e, t) => {
|
|
80
81
|
if (e.length !== t.length)
|
|
81
82
|
throw new Error("Vectors must be the same length");
|
|
82
|
-
let s = 0,
|
|
83
|
-
for (let
|
|
84
|
-
const i = e[
|
|
85
|
-
s += i * l,
|
|
83
|
+
let s = 0, o = 0, a = 0;
|
|
84
|
+
for (let n = 0; n < e.length; ++n) {
|
|
85
|
+
const i = e[n], l = t[n];
|
|
86
|
+
s += i * l, o += i * i, a += l * l;
|
|
86
87
|
}
|
|
87
|
-
const m = Math.sqrt(
|
|
88
|
+
const m = Math.sqrt(o * a);
|
|
88
89
|
if (m === 0)
|
|
89
90
|
return 0;
|
|
90
|
-
const
|
|
91
|
-
return Math.max(-1, Math.min(1,
|
|
92
|
-
},
|
|
91
|
+
const r = s / m;
|
|
92
|
+
return Math.max(-1, Math.min(1, r));
|
|
93
|
+
}, Y = M, Z = P, ee = T, te = h, ae = p, se = V, oe = F, re = C, ne = N, ie = z, ce = H, me = O, le = () => R(), de = () => k(), ge = async (e, t) => await A(e, t), pe = async ({
|
|
93
94
|
modelTier: e = "default",
|
|
94
95
|
temperature: t = 0,
|
|
95
|
-
|
|
96
|
-
} = {}) => await
|
|
96
|
+
config: s
|
|
97
|
+
} = {}) => await x({ modelTier: e, temperature: t, config: s });
|
|
97
98
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
99
|
+
ce as ArcgisKnowledgeAgent,
|
|
100
|
+
ne as DataExplorationAgent,
|
|
101
|
+
ie as HelpAgent,
|
|
102
|
+
re as LayerStylingAgent,
|
|
103
|
+
oe as NavigationAgent,
|
|
104
|
+
ue as Orchestrator,
|
|
105
|
+
se as cosineSimilarity,
|
|
106
|
+
le as createAgentRuntimeState,
|
|
107
|
+
de as createAgentRuntimeStateWithSharedState,
|
|
108
|
+
pe as createChatModel,
|
|
109
|
+
me as createWebmapEmbeddings,
|
|
110
|
+
ae as getEmbeddings,
|
|
111
|
+
Z as invokeStructuredPrompt,
|
|
112
|
+
Y as invokeTextPrompt,
|
|
113
|
+
ee as invokeToolPrompt,
|
|
114
|
+
te as sendTraceMessage,
|
|
115
|
+
ge as sendUXSuggestion
|
|
115
116
|
};
|