@assistant-ui/react-a2a 0.2.36 → 0.2.37
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/A2AClient.d.ts +42 -44
- package/dist/A2AClient.d.ts.map +1 -1
- package/dist/A2AClient.js +43 -7
- package/dist/A2AClient.js.map +1 -1
- package/dist/A2AThreadRuntimeCore.d.ts +98 -86
- package/dist/A2AThreadRuntimeCore.d.ts.map +1 -1
- package/dist/A2AThreadRuntimeCore.js +204 -17
- package/dist/A2AThreadRuntimeCore.js.map +1 -1
- package/dist/a2aExtras.d.ts +1 -3
- package/dist/a2aExtras.d.ts.map +1 -1
- package/dist/conversions.d.ts +18 -17
- package/dist/conversions.d.ts.map +1 -1
- package/dist/conversions.js +24 -2
- package/dist/conversions.js.map +1 -1
- package/dist/hooks.d.ts +3 -6
- package/dist/hooks.d.ts.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/types.d.ts +207 -209
- package/dist/types.d.ts.map +1 -1
- package/dist/useA2ARuntime.d.ts +2 -4
- package/dist/useA2ARuntime.d.ts.map +1 -1
- package/dist/useA2ARuntime.js +8 -0
- package/dist/useA2ARuntime.js.map +1 -1
- package/package.json +6 -5
- package/src/A2AClient.test.ts +41 -0
- package/src/A2AClient.ts +50 -6
- package/src/A2AThreadRuntimeCore.test.ts +887 -9
- package/src/A2AThreadRuntimeCore.ts +347 -18
- package/src/conversions.test.ts +116 -0
- package/src/conversions.ts +48 -1
- package/src/useA2ARuntime.test.tsx +245 -0
- package/src/useA2ARuntime.ts +14 -0
- package/src/useA2ARuntime.voice.test.tsx +370 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,290 +1,288 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/types.d.ts
|
|
1
|
+
import type { AttachmentAdapter, DictationAdapter, ExternalStoreSharedOptions, FeedbackAdapter, RealtimeVoiceAdapter, SpeechSynthesisAdapter, ThreadHistoryAdapter, ThreadMessage } from "@assistant-ui/core";
|
|
2
|
+
import type { A2AClient, A2AClientOptions } from "./A2AClient.js";
|
|
4
3
|
export declare const A2A_PROTOCOL_VERSION = "1.0";
|
|
5
4
|
export type A2ARole = "unspecified" | "user" | "agent";
|
|
6
5
|
export type A2APart = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
text?: string | undefined;
|
|
7
|
+
raw?: string | undefined;
|
|
8
|
+
url?: string | undefined;
|
|
9
|
+
data?: unknown;
|
|
10
|
+
metadata?: Record<string, unknown> | undefined;
|
|
11
|
+
filename?: string | undefined;
|
|
12
|
+
mediaType?: string | undefined;
|
|
14
13
|
};
|
|
15
14
|
export type A2AMessage = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
messageId: string;
|
|
16
|
+
contextId?: string | undefined;
|
|
17
|
+
taskId?: string | undefined;
|
|
18
|
+
role: A2ARole;
|
|
19
|
+
parts: A2APart[];
|
|
20
|
+
metadata?: Record<string, unknown> | undefined;
|
|
21
|
+
extensions?: string[] | undefined;
|
|
22
|
+
referenceTaskIds?: string[] | undefined;
|
|
24
23
|
};
|
|
25
24
|
export type A2ATaskState = "unspecified" | "submitted" | "working" | "completed" | "failed" | "canceled" | "input_required" | "rejected" | "auth_required";
|
|
26
25
|
export type A2ATaskStatus = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
state: A2ATaskState;
|
|
27
|
+
message?: A2AMessage | undefined;
|
|
28
|
+
timestamp?: string | undefined;
|
|
30
29
|
};
|
|
31
30
|
export type A2AArtifact = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
artifactId: string;
|
|
32
|
+
name?: string | undefined;
|
|
33
|
+
description?: string | undefined;
|
|
34
|
+
parts: A2APart[];
|
|
35
|
+
metadata?: Record<string, unknown> | undefined;
|
|
36
|
+
extensions?: string[] | undefined;
|
|
38
37
|
};
|
|
39
38
|
export type A2ATask = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
id: string;
|
|
40
|
+
contextId?: string | undefined;
|
|
41
|
+
status: A2ATaskStatus;
|
|
42
|
+
artifacts?: A2AArtifact[] | undefined;
|
|
43
|
+
history?: A2AMessage[] | undefined;
|
|
44
|
+
metadata?: Record<string, unknown> | undefined;
|
|
46
45
|
};
|
|
47
46
|
export type A2ATaskStatusUpdateEvent = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
taskId: string;
|
|
48
|
+
contextId: string;
|
|
49
|
+
status: A2ATaskStatus;
|
|
50
|
+
metadata?: Record<string, unknown> | undefined;
|
|
52
51
|
};
|
|
53
52
|
export type A2ATaskArtifactUpdateEvent = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
taskId: string;
|
|
54
|
+
contextId: string;
|
|
55
|
+
artifact: A2AArtifact;
|
|
56
|
+
append?: boolean | undefined;
|
|
57
|
+
lastChunk?: boolean | undefined;
|
|
58
|
+
metadata?: Record<string, unknown> | undefined;
|
|
60
59
|
};
|
|
61
60
|
export type A2AStreamEvent = {
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
type: "task";
|
|
62
|
+
task: A2ATask;
|
|
64
63
|
} | {
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
type: "message";
|
|
65
|
+
message: A2AMessage;
|
|
67
66
|
} | {
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
type: "statusUpdate";
|
|
68
|
+
event: A2ATaskStatusUpdateEvent;
|
|
70
69
|
} | {
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
type: "artifactUpdate";
|
|
71
|
+
event: A2ATaskArtifactUpdateEvent;
|
|
73
72
|
};
|
|
74
73
|
export type A2AAuthenticationInfo = {
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
scheme: string;
|
|
75
|
+
credentials?: string | undefined;
|
|
77
76
|
};
|
|
78
77
|
export type A2ATaskPushNotificationConfig = {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
tenant?: string | undefined;
|
|
79
|
+
id?: string | undefined;
|
|
80
|
+
taskId?: string | undefined;
|
|
81
|
+
url: string;
|
|
82
|
+
token?: string | undefined;
|
|
83
|
+
authentication?: A2AAuthenticationInfo | undefined;
|
|
85
84
|
};
|
|
86
85
|
export type A2AListTaskPushNotificationConfigsResponse = {
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
configs: A2ATaskPushNotificationConfig[];
|
|
87
|
+
nextPageToken?: string | undefined;
|
|
89
88
|
};
|
|
90
89
|
export type A2ASendMessageConfiguration = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
acceptedOutputModes?: string[] | undefined;
|
|
91
|
+
taskPushNotificationConfig?: A2ATaskPushNotificationConfig | undefined;
|
|
92
|
+
historyLength?: number | undefined;
|
|
93
|
+
returnImmediately?: boolean | undefined;
|
|
95
94
|
};
|
|
96
95
|
export type A2AListTasksRequest = {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
contextId?: string | undefined;
|
|
97
|
+
status?: A2ATaskState | undefined;
|
|
98
|
+
pageSize?: number | undefined;
|
|
99
|
+
pageToken?: string | undefined;
|
|
100
|
+
historyLength?: number | undefined;
|
|
101
|
+
statusTimestampAfter?: string | undefined;
|
|
102
|
+
includeArtifacts?: boolean | undefined;
|
|
104
103
|
};
|
|
105
104
|
export type A2AListTasksResponse = {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
tasks: A2ATask[];
|
|
106
|
+
nextPageToken: string;
|
|
107
|
+
pageSize: number;
|
|
108
|
+
totalSize: number;
|
|
110
109
|
};
|
|
111
110
|
export type A2AErrorInfo = {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
code: number;
|
|
112
|
+
status: string;
|
|
113
|
+
message: string;
|
|
114
|
+
details?: unknown[] | undefined;
|
|
116
115
|
};
|
|
117
116
|
export type A2AApiKeySecurityScheme = {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
description?: string | undefined;
|
|
118
|
+
location: string;
|
|
119
|
+
name: string;
|
|
121
120
|
};
|
|
122
121
|
export type A2AHttpAuthSecurityScheme = {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
description?: string | undefined;
|
|
123
|
+
scheme: string;
|
|
124
|
+
bearerFormat?: string | undefined;
|
|
126
125
|
};
|
|
127
126
|
export type A2AAuthorizationCodeOAuthFlow = {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
127
|
+
authorizationUrl: string;
|
|
128
|
+
tokenUrl: string;
|
|
129
|
+
refreshUrl?: string | undefined;
|
|
130
|
+
scopes: Record<string, string>;
|
|
131
|
+
pkceRequired?: boolean | undefined;
|
|
133
132
|
};
|
|
134
133
|
export type A2AClientCredentialsOAuthFlow = {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
tokenUrl: string;
|
|
135
|
+
refreshUrl?: string | undefined;
|
|
136
|
+
scopes: Record<string, string>;
|
|
138
137
|
};
|
|
139
138
|
export type A2ADeviceCodeOAuthFlow = {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
deviceAuthorizationUrl: string;
|
|
140
|
+
tokenUrl: string;
|
|
141
|
+
refreshUrl?: string | undefined;
|
|
142
|
+
scopes: Record<string, string>;
|
|
144
143
|
};
|
|
145
144
|
/** @deprecated Use Authorization Code + PKCE instead. */
|
|
146
145
|
export type A2AImplicitOAuthFlow = {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
authorizationUrl?: string | undefined;
|
|
147
|
+
refreshUrl?: string | undefined;
|
|
148
|
+
scopes?: Record<string, string> | undefined;
|
|
150
149
|
};
|
|
151
150
|
/** @deprecated Use Authorization Code + PKCE or Device Code. */
|
|
152
151
|
export type A2APasswordOAuthFlow = {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
tokenUrl?: string | undefined;
|
|
153
|
+
refreshUrl?: string | undefined;
|
|
154
|
+
scopes?: Record<string, string> | undefined;
|
|
156
155
|
};
|
|
157
156
|
export type A2AOAuthFlows = {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
157
|
+
authorizationCode?: A2AAuthorizationCodeOAuthFlow | undefined;
|
|
158
|
+
clientCredentials?: A2AClientCredentialsOAuthFlow | undefined;
|
|
159
|
+
/** @deprecated */
|
|
160
|
+
implicit?: A2AImplicitOAuthFlow | undefined;
|
|
161
|
+
/** @deprecated */
|
|
162
|
+
password?: A2APasswordOAuthFlow | undefined;
|
|
163
|
+
deviceCode?: A2ADeviceCodeOAuthFlow | undefined;
|
|
165
164
|
};
|
|
166
165
|
export type A2AOAuth2SecurityScheme = {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
description?: string | undefined;
|
|
167
|
+
flows: A2AOAuthFlows;
|
|
168
|
+
oauth2MetadataUrl?: string | undefined;
|
|
170
169
|
};
|
|
171
170
|
export type A2AOpenIdConnectSecurityScheme = {
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
description?: string | undefined;
|
|
172
|
+
openIdConnectUrl: string;
|
|
174
173
|
};
|
|
175
174
|
export type A2AMutualTlsSecurityScheme = {
|
|
176
|
-
|
|
175
|
+
description?: string | undefined;
|
|
177
176
|
};
|
|
178
177
|
export type A2ASecurityScheme = {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
apiKeySecurityScheme?: A2AApiKeySecurityScheme | undefined;
|
|
179
|
+
httpAuthSecurityScheme?: A2AHttpAuthSecurityScheme | undefined;
|
|
180
|
+
oauth2SecurityScheme?: A2AOAuth2SecurityScheme | undefined;
|
|
181
|
+
openIdConnectSecurityScheme?: A2AOpenIdConnectSecurityScheme | undefined;
|
|
182
|
+
mtlsSecurityScheme?: A2AMutualTlsSecurityScheme | undefined;
|
|
184
183
|
};
|
|
185
184
|
export type A2ASecurityRequirement = {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
schemes: Record<string, {
|
|
186
|
+
list: string[];
|
|
187
|
+
}>;
|
|
189
188
|
};
|
|
190
189
|
export type A2AAgentCardSignature = {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
protected: string;
|
|
191
|
+
signature: string;
|
|
192
|
+
header?: Record<string, unknown> | undefined;
|
|
194
193
|
};
|
|
195
194
|
export type A2AAgentSkill = {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
195
|
+
id: string;
|
|
196
|
+
name: string;
|
|
197
|
+
description: string;
|
|
198
|
+
tags: string[];
|
|
199
|
+
examples?: string[] | undefined;
|
|
200
|
+
inputModes?: string[] | undefined;
|
|
201
|
+
outputModes?: string[] | undefined;
|
|
202
|
+
securityRequirements?: A2ASecurityRequirement[] | undefined;
|
|
204
203
|
};
|
|
205
204
|
export type A2AAgentCapabilities = {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
205
|
+
streaming?: boolean | undefined;
|
|
206
|
+
pushNotifications?: boolean | undefined;
|
|
207
|
+
extensions?: Array<{
|
|
208
|
+
uri: string;
|
|
209
|
+
description?: string | undefined;
|
|
210
|
+
required?: boolean | undefined;
|
|
211
|
+
params?: Record<string, unknown> | undefined;
|
|
212
|
+
}> | undefined;
|
|
213
|
+
extendedAgentCard?: boolean | undefined;
|
|
215
214
|
};
|
|
216
215
|
export type A2AAgentInterface = {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
url: string;
|
|
217
|
+
protocolBinding: string;
|
|
218
|
+
protocolVersion: string;
|
|
219
|
+
tenant?: string | undefined;
|
|
221
220
|
};
|
|
222
221
|
export type A2AAgentCard = {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
222
|
+
name: string;
|
|
223
|
+
description: string;
|
|
224
|
+
supportedInterfaces: A2AAgentInterface[];
|
|
225
|
+
provider?: {
|
|
226
|
+
organization: string;
|
|
227
|
+
url: string;
|
|
228
|
+
} | undefined;
|
|
229
|
+
version: string;
|
|
230
|
+
documentationUrl?: string | undefined;
|
|
231
|
+
capabilities: A2AAgentCapabilities;
|
|
232
|
+
securitySchemes?: Record<string, A2ASecurityScheme> | undefined;
|
|
233
|
+
securityRequirements?: A2ASecurityRequirement[] | undefined;
|
|
234
|
+
defaultInputModes: string[];
|
|
235
|
+
defaultOutputModes: string[];
|
|
236
|
+
skills: A2AAgentSkill[];
|
|
237
|
+
signatures?: A2AAgentCardSignature[] | undefined;
|
|
238
|
+
iconUrl?: string | undefined;
|
|
240
239
|
};
|
|
241
240
|
/** Private state `useA2ARuntime` exposes through `thread.extras`. */
|
|
242
241
|
export type A2AExtras = {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
task: A2ATask | undefined;
|
|
243
|
+
artifacts: readonly A2AArtifact[];
|
|
244
|
+
agentCard: A2AAgentCard | undefined;
|
|
246
245
|
};
|
|
247
246
|
export type UseA2AThreadListAdapter = {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
247
|
+
threadId?: string;
|
|
248
|
+
onSwitchToNewThread?: () => Promise<void> | void;
|
|
249
|
+
onSwitchToThread?: (threadId: string) => Promise<{
|
|
250
|
+
messages: readonly ThreadMessage[];
|
|
251
|
+
}>;
|
|
253
252
|
};
|
|
254
253
|
export type UseA2ARuntimeOptions = ExternalStoreSharedOptions & {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
};
|
|
289
|
-
//#endregion
|
|
254
|
+
/** Pre-built A2A client instance. Provide this OR baseUrl. */
|
|
255
|
+
client?: A2AClient;
|
|
256
|
+
/** Base URL of the A2A server. Used to create a client if `client` is not provided. */
|
|
257
|
+
baseUrl?: string;
|
|
258
|
+
/** Optional path prefix for all API endpoints (e.g. "/v1"). Does not affect agent card discovery. Only used with baseUrl. */
|
|
259
|
+
basePath?: string;
|
|
260
|
+
/** Optional tenant ID for multi-tenant servers. Only used with baseUrl. */
|
|
261
|
+
tenant?: string;
|
|
262
|
+
/** Headers for the A2A client (only used with baseUrl). */
|
|
263
|
+
headers?: A2AClientOptions["headers"];
|
|
264
|
+
/** A2A extension URIs to negotiate. Only used with baseUrl. */
|
|
265
|
+
extensions?: string[];
|
|
266
|
+
/** Extra fetch options (e.g. `{ credentials: 'include' }`). Only used with `baseUrl`. */
|
|
267
|
+
fetchOptions?: A2AClientOptions["fetchOptions"];
|
|
268
|
+
/** Initial context ID for the conversation. */
|
|
269
|
+
contextId?: string;
|
|
270
|
+
/** Default send message configuration. */
|
|
271
|
+
configuration?: A2ASendMessageConfiguration;
|
|
272
|
+
/** Called when an error occurs. */
|
|
273
|
+
onError?: (error: Error) => void;
|
|
274
|
+
/** Called when a run is cancelled. */
|
|
275
|
+
onCancel?: () => void;
|
|
276
|
+
/** Called when an artifact is fully received (lastChunk). */
|
|
277
|
+
onArtifactComplete?: (artifact: A2AArtifact) => void;
|
|
278
|
+
adapters?: {
|
|
279
|
+
attachments?: AttachmentAdapter;
|
|
280
|
+
speech?: SpeechSynthesisAdapter;
|
|
281
|
+
dictation?: DictationAdapter;
|
|
282
|
+
voice?: RealtimeVoiceAdapter;
|
|
283
|
+
feedback?: FeedbackAdapter;
|
|
284
|
+
history?: ThreadHistoryAdapter;
|
|
285
|
+
threadList?: UseA2AThreadListAdapter;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
290
288
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,uBAAoB;AAE/D,eAAO,MAAM,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AC;IAEhD,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,2BAA2B,CAAC;IAE5C,mCAAmC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;IAErD,QAAQ,CAAC,EAAE;QACT,WAAW,CAAC,EAAE,iBAAiB,CAAC;QAChC,MAAM,CAAC,EAAE,sBAAsB,CAAC;QAChC,SAAS,CAAC,EAAE,gBAAgB,CAAC;QAC7B,KAAK,CAAC,EAAE,oBAAoB,CAAC;QAC7B,QAAQ,CAAC,EAAE,eAAe,CAAC;QAC3B,OAAO,CAAC,EAAE,oBAAoB,CAAC;QAC/B,UAAU,CAAC,EAAE,uBAAuB,CAAC;KACtC,CAAC;CACH,CAAC"}
|
package/dist/useA2ARuntime.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/useA2ARuntime.d.ts
|
|
1
|
+
import type { AssistantRuntime } from "@assistant-ui/core";
|
|
2
|
+
import type { UseA2ARuntimeOptions } from "./types.js";
|
|
4
3
|
export declare function useA2ARuntime(options: UseA2ARuntimeOptions): AssistantRuntime;
|
|
5
|
-
//#endregion
|
|
6
4
|
//# sourceMappingURL=useA2ARuntime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useA2ARuntime.d.ts","
|
|
1
|
+
{"version":3,"file":"useA2ARuntime.d.ts","sourceRoot":"","sources":["../src/useA2ARuntime.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,gBAAgB,EAIjB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAgB;AAmBpD,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,gBAAgB,CA0K7E"}
|
package/dist/useA2ARuntime.js
CHANGED
|
@@ -72,6 +72,8 @@ function useA2ARuntime(options) {
|
|
|
72
72
|
threadId: threadListAdapter.threadId,
|
|
73
73
|
onSwitchToNewThread: onSwitchToNewThread ? async () => {
|
|
74
74
|
const generation = ++threadSwitchGenerationRef.current;
|
|
75
|
+
core.applyExternalMessages([]);
|
|
76
|
+
core.resetContext();
|
|
75
77
|
await onSwitchToNewThread();
|
|
76
78
|
if (generation !== threadSwitchGenerationRef.current) return;
|
|
77
79
|
core.applyExternalMessages([]);
|
|
@@ -79,8 +81,11 @@ function useA2ARuntime(options) {
|
|
|
79
81
|
} : void 0,
|
|
80
82
|
onSwitchToThread: onSwitchToThread ? async (threadId) => {
|
|
81
83
|
const generation = ++threadSwitchGenerationRef.current;
|
|
84
|
+
core.applyExternalMessages([]);
|
|
85
|
+
core.resetContext();
|
|
82
86
|
const result = await onSwitchToThread(threadId);
|
|
83
87
|
if (generation !== threadSwitchGenerationRef.current) return;
|
|
88
|
+
core.applyExternalMessages([]);
|
|
84
89
|
core.applyExternalMessages(result.messages);
|
|
85
90
|
core.resetContext();
|
|
86
91
|
} : void 0
|
|
@@ -106,15 +111,18 @@ function useA2ARuntime(options) {
|
|
|
106
111
|
isLoading: core.isLoading,
|
|
107
112
|
messageRepository: core.getMessageRepository(),
|
|
108
113
|
isRunning: core.isRunning(),
|
|
114
|
+
unstable_persistsHistory: true,
|
|
109
115
|
extras: a2aExtras.provide({
|
|
110
116
|
task: core.getTask(),
|
|
111
117
|
artifacts: core.getArtifacts(),
|
|
112
118
|
agentCard: core.getAgentCard()
|
|
113
119
|
}),
|
|
114
120
|
onNew: (message) => core.append(message),
|
|
121
|
+
onVoiceTranscript: (message) => core.appendVoiceTranscript(message),
|
|
115
122
|
onEdit: (message) => core.edit(message),
|
|
116
123
|
onReload: (parentId) => core.reload(parentId),
|
|
117
124
|
onCancel: () => core.cancel(),
|
|
125
|
+
unstable_onRecordToolInteraction: (options) => core.recordToolInteraction(options),
|
|
118
126
|
setMessages: (messages) => core.applyExternalMessages(messages),
|
|
119
127
|
onImport: (messages) => core.applyExternalMessages(messages),
|
|
120
128
|
adapters: adapterAdapters
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useA2ARuntime.js","names":[],"sources":["../src/useA2ARuntime.ts"],"sourcesContent":["\"use client\";\n\nimport {\n useCallback,\n useEffect,\n useInsertionEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n useExternalStoreRuntime,\n useExternalStoreSharedOptions,\n useRuntimeAdapters,\n} from \"@assistant-ui/core/react\";\nimport type {\n AssistantRuntime,\n AppendMessage,\n ExternalStoreAdapter,\n ThreadMessage,\n} from \"@assistant-ui/core\";\nimport { A2AClient, type A2AClientOptions } from \"./A2AClient\";\nimport { A2AThreadRuntimeCore } from \"./A2AThreadRuntimeCore\";\nimport { a2aExtras } from \"./a2aExtras\";\nimport type { UseA2ARuntimeOptions } from \"./types\";\n\ntype ManagedA2AClientOptions = Omit<A2AClientOptions, \"headers\">;\n\nconst serializeManagedClientOptions = (\n options: ManagedA2AClientOptions,\n): string => {\n const fetchOptions = Object.fromEntries(\n Object.entries(options.fetchOptions ?? {}).sort(([a], [b]) =>\n a.localeCompare(b),\n ),\n );\n\n return JSON.stringify({\n ...options,\n fetchOptions,\n });\n};\n\nexport function useA2ARuntime(options: UseA2ARuntimeOptions): AssistantRuntime {\n const [_version, setVersion] = useState(0);\n const notifyUpdate = useCallback(() => setVersion((v) => v + 1), []);\n const runtimeAdapters = useRuntimeAdapters();\n const historyAdapter = options.adapters?.history ?? runtimeAdapters?.history;\n const threadListAdapter = options.adapters?.threadList;\n\n const headersRef = useRef(options.headers);\n useInsertionEffect(() => {\n headersRef.current = options.headers;\n });\n const resolveHeaders = useCallback(() => {\n const headers = headersRef.current;\n return typeof headers === \"function\" ? headers() : (headers ?? {});\n }, []);\n\n const managedClientOptionsKey = options.client\n ? null\n : options.baseUrl\n ? serializeManagedClientOptions({\n baseUrl: options.baseUrl,\n basePath: options.basePath,\n tenant: options.tenant,\n extensions: options.extensions,\n fetchOptions: options.fetchOptions,\n })\n : null;\n\n const client = useMemo(() => {\n if (options.client) return options.client;\n if (!managedClientOptionsKey) {\n throw new Error(\"useA2ARuntime requires either `client` or `baseUrl`\");\n }\n\n return new A2AClient({\n ...(JSON.parse(managedClientOptionsKey) as ManagedA2AClientOptions),\n headers: resolveHeaders,\n });\n }, [managedClientOptionsKey, options.client, resolveHeaders]);\n\n const coreOptions = {\n client,\n contextId: options.contextId,\n configuration: options.configuration,\n ...(options.onError && { onError: options.onError }),\n ...(options.onCancel && { onCancel: options.onCancel }),\n ...(options.onArtifactComplete && {\n onArtifactComplete: options.onArtifactComplete,\n }),\n ...(historyAdapter && { history: historyAdapter }),\n };\n const coreOptionsRef = useRef(coreOptions);\n coreOptionsRef.current = coreOptions;\n\n const core = useMemo(\n () =>\n new A2AThreadRuntimeCore({\n ...coreOptionsRef.current,\n client,\n notifyUpdate,\n }),\n [client, notifyUpdate],\n );\n\n useEffect(() => {\n core.updateOptions(coreOptions);\n });\n\n // Thread list\n const threadSwitchGenerationRef = useRef(0);\n const threadList = useMemo(() => {\n if (!threadListAdapter) return undefined;\n\n const { onSwitchToNewThread, onSwitchToThread } = threadListAdapter;\n\n return {\n threadId: threadListAdapter.threadId,\n onSwitchToNewThread: onSwitchToNewThread\n ? async () => {\n const generation = ++threadSwitchGenerationRef.current;\n await onSwitchToNewThread();\n if (generation !== threadSwitchGenerationRef.current) return;\n // Apply first so the abort inside resetContext finds an already\n // cleared repository and cannot persist the old thread's partial\n // assistant message.\n core.applyExternalMessages([]);\n core.resetContext();\n }\n : undefined,\n onSwitchToThread: onSwitchToThread\n ? async (threadId: string) => {\n const generation = ++threadSwitchGenerationRef.current;\n const result = await onSwitchToThread(threadId);\n if (generation !== threadSwitchGenerationRef.current) return;\n core.applyExternalMessages(result.messages);\n core.resetContext();\n }\n : undefined,\n };\n }, [threadListAdapter, core]);\n\n // Adapters\n const adapters = options.adapters;\n const adapterAdapters = useMemo(\n () => ({\n attachments: adapters?.attachments ?? runtimeAdapters?.attachments,\n speech: adapters?.speech,\n dictation: adapters?.dictation,\n voice: adapters?.voice,\n feedback: adapters?.feedback,\n threadList,\n }),\n [adapters, runtimeAdapters, threadList],\n );\n\n // Build store adapter\n const shared = useExternalStoreSharedOptions(options);\n const store = useMemo(() => {\n void _version;\n\n return {\n ...shared,\n isLoading: core.isLoading,\n messageRepository: core.getMessageRepository(),\n isRunning: core.isRunning(),\n extras: a2aExtras.provide({\n task: core.getTask(),\n artifacts: core.getArtifacts(),\n agentCard: core.getAgentCard(),\n }),\n onNew: (message: AppendMessage) => core.append(message),\n onEdit: (message: AppendMessage) => core.edit(message),\n onReload: (parentId: string | null) => core.reload(parentId),\n onCancel: () => core.cancel(),\n setMessages: (messages: readonly ThreadMessage[]) =>\n core.applyExternalMessages(messages),\n onImport: (messages: readonly ThreadMessage[]) =>\n core.applyExternalMessages(messages),\n adapters: adapterAdapters,\n } satisfies ExternalStoreAdapter<ThreadMessage>;\n }, [adapterAdapters, core, _version, shared]);\n\n const runtime = useExternalStoreRuntime(store);\n\n useEffect(() => {\n core.attachRuntime(runtime);\n return () => {\n core.detachRuntime();\n };\n }, [core, runtime]);\n\n useEffect(() => {\n core.__internal_load();\n }, [core]);\n\n return runtime;\n}\n"],"mappings":";;;;;;;AA4BA,MAAM,iCACJ,YACW;CACX,MAAM,eAAe,OAAO,YAC1B,OAAO,QAAQ,QAAQ,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OACrD,EAAE,cAAc,CAAC,CACnB,CACF;CAEA,OAAO,KAAK,UAAU;EACpB,GAAG;EACH;CACF,CAAC;AACH;AAEA,SAAgB,cAAc,SAAiD;CAC7E,MAAM,CAAC,UAAU,cAAc,SAAS,CAAC;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B,KAAK,OAAO,QAAQ;GAC3D,gBAAgB,KAAK,OAAO;GAC5B,cAAc,aACZ,KAAK,sBAAsB,QAAQ;GACrC,WAAW,aACT,KAAK,sBAAsB,QAAQ;GACrC,UAAU;EACZ;CACF,GAAG;EAAC;EAAiB;EAAM;EAAU;CAAM,CAAC;CAE5C,MAAM,UAAU,wBAAwB,KAAK;CAE7C,gBAAgB;EACd,KAAK,cAAc,OAAO;EAC1B,aAAa;GACX,KAAK,cAAc;EACrB;CACF,GAAG,CAAC,MAAM,OAAO,CAAC;CAElB,gBAAgB;EACd,KAAK,gBAAgB;CACvB,GAAG,CAAC,IAAI,CAAC;CAET,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"useA2ARuntime.js","names":[],"sources":["../src/useA2ARuntime.ts"],"sourcesContent":["\"use client\";\n\nimport {\n useCallback,\n useEffect,\n useInsertionEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n useExternalStoreRuntime,\n useExternalStoreSharedOptions,\n useRuntimeAdapters,\n} from \"@assistant-ui/core/react\";\nimport type {\n AssistantRuntime,\n AppendMessage,\n ExternalStoreAdapter,\n ThreadMessage,\n} from \"@assistant-ui/core\";\nimport { A2AClient, type A2AClientOptions } from \"./A2AClient\";\nimport { A2AThreadRuntimeCore } from \"./A2AThreadRuntimeCore\";\nimport { a2aExtras } from \"./a2aExtras\";\nimport type { UseA2ARuntimeOptions } from \"./types\";\n\ntype ManagedA2AClientOptions = Omit<A2AClientOptions, \"headers\">;\n\nconst serializeManagedClientOptions = (\n options: ManagedA2AClientOptions,\n): string => {\n const fetchOptions = Object.fromEntries(\n Object.entries(options.fetchOptions ?? {}).sort(([a], [b]) =>\n a.localeCompare(b),\n ),\n );\n\n return JSON.stringify({\n ...options,\n fetchOptions,\n });\n};\n\nexport function useA2ARuntime(options: UseA2ARuntimeOptions): AssistantRuntime {\n const [_version, setVersion] = useState(0);\n const notifyUpdate = useCallback(() => setVersion((v) => v + 1), []);\n const runtimeAdapters = useRuntimeAdapters();\n const historyAdapter = options.adapters?.history ?? runtimeAdapters?.history;\n const threadListAdapter = options.adapters?.threadList;\n\n const headersRef = useRef(options.headers);\n useInsertionEffect(() => {\n headersRef.current = options.headers;\n });\n const resolveHeaders = useCallback(() => {\n const headers = headersRef.current;\n return typeof headers === \"function\" ? headers() : (headers ?? {});\n }, []);\n\n const managedClientOptionsKey = options.client\n ? null\n : options.baseUrl\n ? serializeManagedClientOptions({\n baseUrl: options.baseUrl,\n basePath: options.basePath,\n tenant: options.tenant,\n extensions: options.extensions,\n fetchOptions: options.fetchOptions,\n })\n : null;\n\n const client = useMemo(() => {\n if (options.client) return options.client;\n if (!managedClientOptionsKey) {\n throw new Error(\"useA2ARuntime requires either `client` or `baseUrl`\");\n }\n\n return new A2AClient({\n ...(JSON.parse(managedClientOptionsKey) as ManagedA2AClientOptions),\n headers: resolveHeaders,\n });\n }, [managedClientOptionsKey, options.client, resolveHeaders]);\n\n const coreOptions = {\n client,\n contextId: options.contextId,\n configuration: options.configuration,\n ...(options.onError && { onError: options.onError }),\n ...(options.onCancel && { onCancel: options.onCancel }),\n ...(options.onArtifactComplete && {\n onArtifactComplete: options.onArtifactComplete,\n }),\n ...(historyAdapter && { history: historyAdapter }),\n };\n const coreOptionsRef = useRef(coreOptions);\n coreOptionsRef.current = coreOptions;\n\n const core = useMemo(\n () =>\n new A2AThreadRuntimeCore({\n ...coreOptionsRef.current,\n client,\n notifyUpdate,\n }),\n [client, notifyUpdate],\n );\n\n useEffect(() => {\n core.updateOptions(coreOptions);\n });\n\n // Thread list\n const threadSwitchGenerationRef = useRef(0);\n const threadList = useMemo(() => {\n if (!threadListAdapter) return undefined;\n\n const { onSwitchToNewThread, onSwitchToThread } = threadListAdapter;\n\n return {\n threadId: threadListAdapter.threadId,\n onSwitchToNewThread: onSwitchToNewThread\n ? async () => {\n const generation = ++threadSwitchGenerationRef.current;\n // Clear before the thread id flips, or the old messages leak\n // into the new thread as a sibling branch.\n core.applyExternalMessages([]);\n core.resetContext();\n await onSwitchToNewThread();\n if (generation !== threadSwitchGenerationRef.current) return;\n // Apply first so the abort inside resetContext finds an already\n // cleared repository and cannot persist the old thread's partial\n // assistant message.\n core.applyExternalMessages([]);\n core.resetContext();\n }\n : undefined,\n onSwitchToThread: onSwitchToThread\n ? async (threadId: string) => {\n const generation = ++threadSwitchGenerationRef.current;\n // Clear before the thread id flips, or the old messages leak\n // into the new thread as a sibling branch.\n core.applyExternalMessages([]);\n core.resetContext();\n const result = await onSwitchToThread(threadId);\n if (generation !== threadSwitchGenerationRef.current) return;\n core.applyExternalMessages([]);\n core.applyExternalMessages(result.messages);\n core.resetContext();\n }\n : undefined,\n };\n }, [threadListAdapter, core]);\n\n // Adapters\n const adapters = options.adapters;\n const adapterAdapters = useMemo(\n () => ({\n attachments: adapters?.attachments ?? runtimeAdapters?.attachments,\n speech: adapters?.speech,\n dictation: adapters?.dictation,\n voice: adapters?.voice,\n feedback: adapters?.feedback,\n threadList,\n }),\n [adapters, runtimeAdapters, threadList],\n );\n\n // Build store adapter\n const shared = useExternalStoreSharedOptions(options);\n const store = useMemo(() => {\n void _version;\n\n return {\n ...shared,\n isLoading: core.isLoading,\n messageRepository: core.getMessageRepository(),\n isRunning: core.isRunning(),\n unstable_persistsHistory: true,\n extras: a2aExtras.provide({\n task: core.getTask(),\n artifacts: core.getArtifacts(),\n agentCard: core.getAgentCard(),\n }),\n onNew: (message: AppendMessage) => core.append(message),\n onVoiceTranscript: (message: ThreadMessage) =>\n core.appendVoiceTranscript(message),\n onEdit: (message: AppendMessage) => core.edit(message),\n onReload: (parentId: string | null) => core.reload(parentId),\n onCancel: () => core.cancel(),\n unstable_onRecordToolInteraction: (options) =>\n core.recordToolInteraction(options),\n setMessages: (messages: readonly ThreadMessage[]) =>\n core.applyExternalMessages(messages),\n onImport: (messages: readonly ThreadMessage[]) =>\n core.applyExternalMessages(messages),\n adapters: adapterAdapters,\n } satisfies ExternalStoreAdapter<ThreadMessage>;\n }, [adapterAdapters, core, _version, shared]);\n\n const runtime = useExternalStoreRuntime(store);\n\n useEffect(() => {\n core.attachRuntime(runtime);\n return () => {\n core.detachRuntime();\n };\n }, [core, runtime]);\n\n useEffect(() => {\n core.__internal_load();\n }, [core]);\n\n return runtime;\n}\n"],"mappings":";;;;;;;AA4BA,MAAM,iCACJ,YACW;CACX,MAAM,eAAe,OAAO,YAC1B,OAAO,QAAQ,QAAQ,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OACrD,EAAE,cAAc,CAAC,CACnB,CACF;CAEA,OAAO,KAAK,UAAU;EACpB,GAAG;EACH;CACF,CAAC;AACH;AAEA,SAAgB,cAAc,SAAiD;CAC7E,MAAM,CAAC,UAAU,cAAc,SAAS,CAAC;CACzC,MAAM,eAAe,kBAAkB,YAAY,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC;CACnE,MAAM,kBAAkB,mBAAmB;CAC3C,MAAM,iBAAiB,QAAQ,UAAU,WAAW,iBAAiB;CACrE,MAAM,oBAAoB,QAAQ,UAAU;CAE5C,MAAM,aAAa,OAAO,QAAQ,OAAO;CACzC,yBAAyB;EACvB,WAAW,UAAU,QAAQ;CAC/B,CAAC;CACD,MAAM,iBAAiB,kBAAkB;EACvC,MAAM,UAAU,WAAW;EAC3B,OAAO,OAAO,YAAY,aAAa,QAAQ,IAAK,WAAW,CAAC;CAClE,GAAG,CAAC,CAAC;CAEL,MAAM,0BAA0B,QAAQ,SACpC,OACA,QAAQ,UACN,8BAA8B;EAC5B,SAAS,QAAQ;EACjB,UAAU,QAAQ;EAClB,QAAQ,QAAQ;EAChB,YAAY,QAAQ;EACpB,cAAc,QAAQ;CACxB,CAAC,IACD;CAEN,MAAM,SAAS,cAAc;EAC3B,IAAI,QAAQ,QAAQ,OAAO,QAAQ;EACnC,IAAI,CAAC,yBACH,MAAM,IAAI,MAAM,qDAAqD;EAGvE,OAAO,IAAI,UAAU;GACnB,GAAI,KAAK,MAAM,uBAAuB;GAC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