@convex-dev/agent 0.7.1 → 0.7.3
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/README.md +5 -8
- package/dist/client/messages.d.ts +10 -0
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/messages.js +1 -0
- package/dist/client/messages.js.map +1 -1
- package/dist/component/_generated/component.d.ts +10 -8
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/messages.d.ts +340 -338
- package/dist/component/messages.d.ts.map +1 -1
- package/dist/component/messages.js +74 -14
- package/dist/component/messages.js.map +1 -1
- package/dist/component/schema.d.ts +726 -622
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/streams.d.ts +6 -1
- package/dist/component/streams.d.ts.map +1 -1
- package/dist/component/streams.js +14 -15
- package/dist/component/streams.js.map +1 -1
- package/dist/component/threads.d.ts.map +1 -1
- package/dist/component/threads.js +1 -0
- package/dist/component/threads.js.map +1 -1
- package/dist/component/vector/index.d.ts +9 -9
- package/dist/component/vector/index.d.ts.map +1 -1
- package/dist/component/vector/tables.d.ts +5 -5
- package/dist/component/vector/tables.d.ts.map +1 -1
- package/dist/component/vector/tables.js +1 -1
- package/dist/component/vector/tables.js.map +1 -1
- package/dist/errors.d.ts +2 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +106 -0
- package/dist/errors.js.map +1 -0
- package/dist/validators.d.ts +1952 -1952
- package/dist/vercel/client/definePlaygroundAPI.d.ts +132 -132
- package/dist/vercel/client/messages.d.ts +50 -32
- package/dist/vercel/client/messages.d.ts.map +1 -1
- package/dist/vercel/client/messages.js +2 -0
- package/dist/vercel/client/messages.js.map +1 -1
- package/dist/vercel/client/search.d.ts +475 -32
- package/dist/vercel/client/search.d.ts.map +1 -1
- package/dist/vercel/client/search.js +34 -9
- package/dist/vercel/client/search.js.map +1 -1
- package/dist/vercel/client/start.d.ts.map +1 -1
- package/dist/vercel/client/start.js +1 -0
- package/dist/vercel/client/start.js.map +1 -1
- package/dist/vercel/client/streamText.d.ts +1 -2
- package/dist/vercel/client/streamText.d.ts.map +1 -1
- package/dist/vercel/client/streamText.js +79 -22
- package/dist/vercel/client/streamText.js.map +1 -1
- package/dist/vercel/client/streaming.d.ts +326 -305
- package/dist/vercel/client/streaming.d.ts.map +1 -1
- package/dist/vercel/client/streaming.js +140 -25
- package/dist/vercel/client/streaming.js.map +1 -1
- package/dist/vercel/client/types.d.ts +2 -0
- package/dist/vercel/client/types.d.ts.map +1 -1
- package/dist/vercel/client/types.js.map +1 -1
- package/dist/vercel/client/utils.d.ts +9 -5
- package/dist/vercel/client/utils.d.ts.map +1 -1
- package/dist/vercel/client/utils.js +13 -13
- package/dist/vercel/client/utils.js.map +1 -1
- package/dist/vercel/index.d.ts +91 -90
- package/dist/vercel/index.d.ts.map +1 -1
- package/dist/vercel/index.js +2 -0
- package/dist/vercel/index.js.map +1 -1
- package/package.json +16 -9
- package/src/client/messages.ts +12 -0
- package/src/component/_generated/component.ts +10 -0
- package/src/component/messages.test.ts +404 -0
- package/src/component/messages.ts +94 -12
- package/src/component/streams.test.ts +54 -1
- package/src/component/streams.ts +20 -17
- package/src/component/threads.test.ts +39 -0
- package/src/component/threads.ts +1 -0
- package/src/component/vector/tables.ts +1 -1
- package/src/errors.test.ts +76 -0
- package/src/errors.ts +113 -0
- package/src/vercel/client/deltaFlush.test.ts +106 -0
- package/src/vercel/client/index.test.ts +47 -0
- package/src/vercel/client/messages.ts +20 -0
- package/src/vercel/client/search.test.ts +183 -8
- package/src/vercel/client/search.ts +46 -12
- package/src/vercel/client/start.ts +1 -0
- package/src/vercel/client/streamText.test.ts +577 -18
- package/src/vercel/client/streamText.ts +84 -32
- package/src/vercel/client/streaming.integration.test.ts +40 -3
- package/src/vercel/client/streaming.test.ts +101 -7
- package/src/vercel/client/streaming.throttle.test.ts +144 -0
- package/src/vercel/client/streaming.ts +161 -25
- package/src/vercel/client/types.ts +2 -0
- package/src/vercel/client/utils.test.ts +97 -0
- package/src/vercel/client/utils.ts +15 -15
- package/src/vercel/index.ts +2 -0
|
@@ -3,6 +3,7 @@ import type { PaginationOptions, PaginationResult } from "convex/server";
|
|
|
3
3
|
import type { MessageDoc } from "../../validators.js";
|
|
4
4
|
import { type Message, type MessageEmbeddings, type MessageWithMetadata } from "../../validators.js";
|
|
5
5
|
import { type UIMessage } from "../UIMessages.js";
|
|
6
|
+
import { type MessageOrder } from "../../client/messages.js";
|
|
6
7
|
import type { AgentComponent, MutationCtx, QueryCtx, ActionCtx } from "./types.js";
|
|
7
8
|
export { listMessages } from "../../client/messages.js";
|
|
8
9
|
export declare function listUIMessages(ctx: QueryCtx | MutationCtx | ActionCtx, component: AgentComponent, args: {
|
|
@@ -12,6 +13,15 @@ export declare function listUIMessages(ctx: QueryCtx | MutationCtx | ActionCtx,
|
|
|
12
13
|
export type SaveMessagesArgs = {
|
|
13
14
|
threadId: string;
|
|
14
15
|
userId?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Save the first message at this order. Pass `"next"` to allocate a new
|
|
18
|
+
* order after the current latest message. If the numeric order already
|
|
19
|
+
* contains messages, the message is appended at the next stepOrder.
|
|
20
|
+
* Numeric orders must be non-negative safe integers less than
|
|
21
|
+
* Number.MAX_SAFE_INTEGER.
|
|
22
|
+
* Cannot be combined with promptMessageId or pendingMessageId.
|
|
23
|
+
*/
|
|
24
|
+
order?: MessageOrder;
|
|
15
25
|
/**
|
|
16
26
|
* The message that these messages are in response to. They will be
|
|
17
27
|
* the same "order" as this message, at increasing stepOrder(s).
|
|
@@ -54,6 +64,14 @@ export declare function saveMessages(ctx: MutationCtx | ActionCtx, component: Ag
|
|
|
54
64
|
export type SaveMessageArgs = {
|
|
55
65
|
threadId: string;
|
|
56
66
|
userId?: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* Save the message at this order. Pass `"next"` to allocate a new order
|
|
69
|
+
* after the current latest message. If the numeric order already contains
|
|
70
|
+
* messages, the message is appended at the next stepOrder. Numeric orders
|
|
71
|
+
* must be non-negative safe integers less than Number.MAX_SAFE_INTEGER.
|
|
72
|
+
* Cannot be combined with promptMessageId or pendingMessageId.
|
|
73
|
+
*/
|
|
74
|
+
order?: MessageOrder;
|
|
57
75
|
/**
|
|
58
76
|
* The message that these messages are in response to. They will be
|
|
59
77
|
* the same "order" as this message, at increasing stepOrder(s).
|
|
@@ -100,17 +118,6 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
100
118
|
}): Promise<{
|
|
101
119
|
messageId: string;
|
|
102
120
|
message: {
|
|
103
|
-
text?: string | undefined;
|
|
104
|
-
reasoning?: string | undefined;
|
|
105
|
-
id?: string | undefined;
|
|
106
|
-
userId?: string | undefined;
|
|
107
|
-
embeddingId?: string | undefined;
|
|
108
|
-
fileIds?: string[] | undefined;
|
|
109
|
-
error?: string | undefined;
|
|
110
|
-
agentName?: string | undefined;
|
|
111
|
-
model?: string | undefined;
|
|
112
|
-
provider?: string | undefined;
|
|
113
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
114
121
|
message?: {
|
|
115
122
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
116
123
|
role: "user";
|
|
@@ -134,11 +141,11 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
134
141
|
mediaType?: string | undefined;
|
|
135
142
|
mimeType?: string | undefined;
|
|
136
143
|
filename?: string | undefined;
|
|
137
|
-
type: "file";
|
|
138
144
|
data: string | ArrayBuffer | {
|
|
139
145
|
type: "reference";
|
|
140
146
|
reference: Record<string, string>;
|
|
141
147
|
};
|
|
148
|
+
type: "file";
|
|
142
149
|
})[];
|
|
143
150
|
} | {
|
|
144
151
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -154,11 +161,11 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
154
161
|
mediaType?: string | undefined;
|
|
155
162
|
mimeType?: string | undefined;
|
|
156
163
|
filename?: string | undefined;
|
|
157
|
-
type: "file";
|
|
158
164
|
data: string | ArrayBuffer | {
|
|
159
165
|
type: "reference";
|
|
160
166
|
reference: Record<string, string>;
|
|
161
167
|
};
|
|
168
|
+
type: "file";
|
|
162
169
|
} | {
|
|
163
170
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
164
171
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -166,9 +173,9 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
166
173
|
text: string;
|
|
167
174
|
type: "reasoning";
|
|
168
175
|
} | {
|
|
176
|
+
data?: string | ArrayBuffer | undefined;
|
|
169
177
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
170
178
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
171
|
-
data?: string | ArrayBuffer | undefined;
|
|
172
179
|
url?: string | undefined;
|
|
173
180
|
type: "reasoning-file";
|
|
174
181
|
mediaType: string;
|
|
@@ -180,8 +187,8 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
180
187
|
} | {
|
|
181
188
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
182
189
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
183
|
-
type: "redacted-reasoning";
|
|
184
190
|
data: string;
|
|
191
|
+
type: "redacted-reasoning";
|
|
185
192
|
} | {
|
|
186
193
|
title?: string | undefined;
|
|
187
194
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -238,8 +245,6 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
238
245
|
} | {
|
|
239
246
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
240
247
|
filename?: string | undefined;
|
|
241
|
-
type: "file";
|
|
242
|
-
mediaType: string;
|
|
243
248
|
data: {
|
|
244
249
|
type: "reference";
|
|
245
250
|
reference: Record<string, string>;
|
|
@@ -247,22 +252,24 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
247
252
|
type: "url";
|
|
248
253
|
url: string;
|
|
249
254
|
} | {
|
|
250
|
-
type: "data";
|
|
251
255
|
data: string | ArrayBuffer;
|
|
256
|
+
type: "data";
|
|
252
257
|
} | {
|
|
253
258
|
text: string;
|
|
254
259
|
type: "text";
|
|
255
260
|
};
|
|
261
|
+
type: "file";
|
|
262
|
+
mediaType: string;
|
|
256
263
|
} | {
|
|
264
|
+
data: string;
|
|
257
265
|
type: "media";
|
|
258
266
|
mediaType: string;
|
|
259
|
-
data: string;
|
|
260
267
|
} | {
|
|
261
268
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
262
269
|
filename?: string | undefined;
|
|
270
|
+
data: string;
|
|
263
271
|
type: "file-data";
|
|
264
272
|
mediaType: string;
|
|
265
|
-
data: string;
|
|
266
273
|
} | {
|
|
267
274
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
268
275
|
mediaType?: string | undefined;
|
|
@@ -278,9 +285,9 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
278
285
|
providerReference: Record<string, string>;
|
|
279
286
|
} | {
|
|
280
287
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
288
|
+
data: string;
|
|
281
289
|
type: "image-data";
|
|
282
290
|
mediaType: string;
|
|
283
|
-
data: string;
|
|
284
291
|
} | {
|
|
285
292
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
286
293
|
type: "image-file-reference";
|
|
@@ -305,8 +312,8 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
305
312
|
type: "text";
|
|
306
313
|
} | {
|
|
307
314
|
mimeType?: string | undefined;
|
|
308
|
-
type: "image";
|
|
309
315
|
data: string;
|
|
316
|
+
type: "image";
|
|
310
317
|
})[] | undefined;
|
|
311
318
|
type: "tool-result";
|
|
312
319
|
toolCallId: string;
|
|
@@ -374,8 +381,6 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
374
381
|
} | {
|
|
375
382
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
376
383
|
filename?: string | undefined;
|
|
377
|
-
type: "file";
|
|
378
|
-
mediaType: string;
|
|
379
384
|
data: {
|
|
380
385
|
type: "reference";
|
|
381
386
|
reference: Record<string, string>;
|
|
@@ -383,22 +388,24 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
383
388
|
type: "url";
|
|
384
389
|
url: string;
|
|
385
390
|
} | {
|
|
386
|
-
type: "data";
|
|
387
391
|
data: string | ArrayBuffer;
|
|
392
|
+
type: "data";
|
|
388
393
|
} | {
|
|
389
394
|
text: string;
|
|
390
395
|
type: "text";
|
|
391
396
|
};
|
|
397
|
+
type: "file";
|
|
398
|
+
mediaType: string;
|
|
392
399
|
} | {
|
|
400
|
+
data: string;
|
|
393
401
|
type: "media";
|
|
394
402
|
mediaType: string;
|
|
395
|
-
data: string;
|
|
396
403
|
} | {
|
|
397
404
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
398
405
|
filename?: string | undefined;
|
|
406
|
+
data: string;
|
|
399
407
|
type: "file-data";
|
|
400
408
|
mediaType: string;
|
|
401
|
-
data: string;
|
|
402
409
|
} | {
|
|
403
410
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
404
411
|
mediaType?: string | undefined;
|
|
@@ -414,9 +421,9 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
414
421
|
providerReference: Record<string, string>;
|
|
415
422
|
} | {
|
|
416
423
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
424
|
+
data: string;
|
|
417
425
|
type: "image-data";
|
|
418
426
|
mediaType: string;
|
|
419
|
-
data: string;
|
|
420
427
|
} | {
|
|
421
428
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
422
429
|
type: "image-file-reference";
|
|
@@ -441,8 +448,8 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
441
448
|
type: "text";
|
|
442
449
|
} | {
|
|
443
450
|
mimeType?: string | undefined;
|
|
444
|
-
type: "image";
|
|
445
451
|
data: string;
|
|
452
|
+
type: "image";
|
|
446
453
|
})[] | undefined;
|
|
447
454
|
type: "tool-result";
|
|
448
455
|
toolCallId: string;
|
|
@@ -461,6 +468,17 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
461
468
|
role: "system";
|
|
462
469
|
content: string;
|
|
463
470
|
} | undefined;
|
|
471
|
+
error?: string | undefined;
|
|
472
|
+
text?: string | undefined;
|
|
473
|
+
reasoning?: string | undefined;
|
|
474
|
+
id?: string | undefined;
|
|
475
|
+
userId?: string | undefined;
|
|
476
|
+
embeddingId?: string | undefined;
|
|
477
|
+
fileIds?: string[] | undefined;
|
|
478
|
+
agentName?: string | undefined;
|
|
479
|
+
model?: string | undefined;
|
|
480
|
+
provider?: string | undefined;
|
|
481
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
464
482
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
465
483
|
usage?: {
|
|
466
484
|
promptTokens?: number | undefined;
|
|
@@ -500,8 +518,8 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
500
518
|
type: "compatibility";
|
|
501
519
|
feature: string;
|
|
502
520
|
} | {
|
|
503
|
-
type: "deprecated";
|
|
504
521
|
message: string;
|
|
522
|
+
type: "deprecated";
|
|
505
523
|
setting: string;
|
|
506
524
|
} | {
|
|
507
525
|
details?: string | undefined;
|
|
@@ -512,8 +530,8 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
512
530
|
tool: any;
|
|
513
531
|
type: "unsupported-tool";
|
|
514
532
|
} | {
|
|
515
|
-
type: "other";
|
|
516
533
|
message: string;
|
|
534
|
+
type: "other";
|
|
517
535
|
})[] | undefined;
|
|
518
536
|
finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
519
537
|
reasoningDetails?: ({
|
|
@@ -527,8 +545,8 @@ export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: Age
|
|
|
527
545
|
text: string;
|
|
528
546
|
type: "text";
|
|
529
547
|
} | {
|
|
530
|
-
type: "redacted";
|
|
531
548
|
data: string;
|
|
549
|
+
type: "redacted";
|
|
532
550
|
})[] | undefined;
|
|
533
551
|
tool: boolean;
|
|
534
552
|
status: "pending" | "success" | "failed";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/vercel/client/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/vercel/client/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,cAAc,EACd,WAAW,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyBF"}
|
|
@@ -17,6 +17,7 @@ export async function saveMessages(ctx, component, args) {
|
|
|
17
17
|
userId: args.userId ?? undefined,
|
|
18
18
|
agentName: args.agentName,
|
|
19
19
|
promptMessageId: args.promptMessageId,
|
|
20
|
+
order: args.order,
|
|
20
21
|
pendingMessageId: args.pendingMessageId,
|
|
21
22
|
embeddings: args.embeddings,
|
|
22
23
|
messages: serialized.map(({ message }) => message),
|
|
@@ -53,6 +54,7 @@ export async function saveMessage(ctx, component, args) {
|
|
|
53
54
|
userId: args.userId ?? undefined,
|
|
54
55
|
agentName: args.agentName,
|
|
55
56
|
promptMessageId: args.promptMessageId,
|
|
57
|
+
order: args.order,
|
|
56
58
|
pendingMessageId: args.pendingMessageId,
|
|
57
59
|
messages: args.prompt !== undefined
|
|
58
60
|
? [{ role: "user", content: args.prompt }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/vercel/client/messages.ts"],"names":[],"mappings":"AAGA,OAAO,EAIN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,YAAY,EAAkB,MAAM,kBAAkB,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,YAAY,IAAI,qBAAqB,
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/vercel/client/messages.ts"],"names":[],"mappings":"AAGA,OAAO,EAIN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,YAAY,EAAkB,MAAM,kBAAkB,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,YAAY,IAAI,qBAAqB,GAEtC,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,CAAC,KA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