@convex-dev/agent 0.1.6 → 0.1.7-alpha.0
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 +23 -12
- package/dist/commonjs/client/_generated/_ignore.d.ts +1 -0
- package/dist/commonjs/client/_generated/_ignore.d.ts.map +1 -0
- package/dist/commonjs/client/_generated/_ignore.js +3 -0
- package/dist/commonjs/client/_generated/_ignore.js.map +1 -0
- package/dist/commonjs/client/files.d.ts +57 -0
- package/dist/commonjs/client/files.d.ts.map +1 -0
- package/dist/commonjs/client/files.js +124 -0
- package/dist/commonjs/client/files.js.map +1 -0
- package/dist/commonjs/client/index.d.ts +489 -318
- package/dist/commonjs/client/index.d.ts.map +1 -1
- package/dist/commonjs/client/index.js +652 -550
- package/dist/commonjs/client/index.js.map +1 -1
- package/dist/commonjs/client/types.d.ts +35 -5
- package/dist/commonjs/client/types.d.ts.map +1 -1
- package/dist/commonjs/component/_generated/api.d.ts +53 -711
- package/dist/commonjs/component/files.d.ts +66 -21
- package/dist/commonjs/component/files.d.ts.map +1 -1
- package/dist/commonjs/component/files.js +71 -26
- package/dist/commonjs/component/files.js.map +1 -1
- package/dist/commonjs/component/messages.d.ts +37 -499
- package/dist/commonjs/component/messages.d.ts.map +1 -1
- package/dist/commonjs/component/messages.js +44 -124
- package/dist/commonjs/component/messages.js.map +1 -1
- package/dist/commonjs/component/schema.d.ts +951 -3785
- package/dist/commonjs/component/schema.d.ts.map +1 -1
- package/dist/commonjs/component/schema.js +8 -25
- package/dist/commonjs/component/schema.js.map +1 -1
- package/dist/commonjs/component/streams.d.ts +3 -3
- package/dist/commonjs/mapping.d.ts +28 -19
- package/dist/commonjs/mapping.d.ts.map +1 -1
- package/dist/commonjs/mapping.js +136 -81
- package/dist/commonjs/mapping.js.map +1 -1
- package/dist/commonjs/react/toUIMessages.d.ts.map +1 -1
- package/dist/commonjs/react/toUIMessages.js +12 -6
- package/dist/commonjs/react/toUIMessages.js.map +1 -1
- package/dist/commonjs/validators.d.ts +851 -3388
- package/dist/commonjs/validators.d.ts.map +1 -1
- package/dist/commonjs/validators.js +11 -37
- package/dist/commonjs/validators.js.map +1 -1
- package/dist/commonjs.tsbuildinfo +1 -1
- package/dist/esm/client/_generated/_ignore.d.ts +1 -0
- package/dist/esm/client/_generated/_ignore.d.ts.map +1 -0
- package/dist/esm/client/_generated/_ignore.js +3 -0
- package/dist/esm/client/_generated/_ignore.js.map +1 -0
- package/dist/esm/client/files.d.ts +57 -0
- package/dist/esm/client/files.d.ts.map +1 -0
- package/dist/esm/client/files.js +124 -0
- package/dist/esm/client/files.js.map +1 -0
- package/dist/esm/client/index.d.ts +489 -318
- package/dist/esm/client/index.d.ts.map +1 -1
- package/dist/esm/client/index.js +652 -550
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/client/types.d.ts +35 -5
- package/dist/esm/client/types.d.ts.map +1 -1
- package/dist/esm/component/_generated/api.d.ts +53 -711
- package/dist/esm/component/files.d.ts +66 -21
- package/dist/esm/component/files.d.ts.map +1 -1
- package/dist/esm/component/files.js +71 -26
- package/dist/esm/component/files.js.map +1 -1
- package/dist/esm/component/messages.d.ts +37 -499
- package/dist/esm/component/messages.d.ts.map +1 -1
- package/dist/esm/component/messages.js +44 -124
- package/dist/esm/component/messages.js.map +1 -1
- package/dist/esm/component/schema.d.ts +951 -3785
- package/dist/esm/component/schema.d.ts.map +1 -1
- package/dist/esm/component/schema.js +8 -25
- package/dist/esm/component/schema.js.map +1 -1
- package/dist/esm/component/streams.d.ts +3 -3
- package/dist/esm/mapping.d.ts +28 -19
- package/dist/esm/mapping.d.ts.map +1 -1
- package/dist/esm/mapping.js +136 -81
- package/dist/esm/mapping.js.map +1 -1
- package/dist/esm/react/toUIMessages.d.ts.map +1 -1
- package/dist/esm/react/toUIMessages.js +12 -6
- package/dist/esm/react/toUIMessages.js.map +1 -1
- package/dist/esm/validators.d.ts +851 -3388
- package/dist/esm/validators.d.ts.map +1 -1
- package/dist/esm/validators.js +11 -37
- package/dist/esm/validators.js.map +1 -1
- package/dist/esm.tsbuildinfo +1 -1
- package/package.json +11 -9
- package/src/client/_generated/_ignore.ts +1 -0
- package/src/client/files.ts +167 -0
- package/src/client/index.test.ts +127 -1
- package/src/client/index.ts +970 -812
- package/src/client/setup.test.ts +29 -0
- package/src/client/types.ts +41 -3
- package/src/component/_generated/api.d.ts +53 -711
- package/src/component/files.test.ts +130 -0
- package/src/component/files.ts +83 -27
- package/src/component/messages.test.ts +2 -1
- package/src/component/messages.ts +46 -136
- package/src/component/schema.ts +7 -28
- package/src/mapping.test.ts +163 -0
- package/src/mapping.ts +173 -103
- package/src/react/deltas.test.ts +4 -1
- package/src/react/toUIMessages.ts +12 -6
- package/src/validators.ts +33 -47
|
@@ -59,28 +59,22 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
59
59
|
userId?: string | undefined;
|
|
60
60
|
pending?: boolean | undefined;
|
|
61
61
|
agentName?: string | undefined;
|
|
62
|
-
|
|
62
|
+
promptMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
63
|
+
failPendingSteps?: boolean | undefined;
|
|
63
64
|
embeddings?: {
|
|
64
65
|
model: string;
|
|
65
66
|
dimension: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
|
|
66
67
|
vectors: (number[] | null)[];
|
|
67
68
|
} | undefined;
|
|
68
|
-
promptMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
69
|
-
failPendingSteps?: boolean | undefined;
|
|
70
69
|
threadId: import("convex/values").GenericId<"threads">;
|
|
71
70
|
messages: {
|
|
72
71
|
id?: string | undefined;
|
|
72
|
+
fileIds?: import("convex/values").GenericId<"files">[] | undefined;
|
|
73
73
|
error?: string | undefined;
|
|
74
74
|
model?: string | undefined;
|
|
75
75
|
provider?: string | undefined;
|
|
76
76
|
text?: string | undefined;
|
|
77
77
|
reasoning?: string | undefined;
|
|
78
|
-
files?: {
|
|
79
|
-
data?: string | ArrayBuffer | undefined;
|
|
80
|
-
url?: string | undefined;
|
|
81
|
-
fileId?: import("convex/values").GenericId<"files"> | undefined;
|
|
82
|
-
mimeType: string;
|
|
83
|
-
}[] | undefined;
|
|
84
78
|
usage?: {
|
|
85
79
|
promptTokens: number;
|
|
86
80
|
completionTokens: number;
|
|
@@ -91,8 +85,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
91
85
|
title?: string | undefined;
|
|
92
86
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
93
87
|
id: string;
|
|
94
|
-
url: string;
|
|
95
88
|
sourceType: "url";
|
|
89
|
+
url: string;
|
|
96
90
|
}[] | undefined;
|
|
97
91
|
reasoningDetails?: ({
|
|
98
92
|
signature?: string | undefined;
|
|
@@ -191,11 +185,11 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
191
185
|
}[];
|
|
192
186
|
}, Promise<{
|
|
193
187
|
messages: {
|
|
194
|
-
_id: import("convex/values").GenericId<"messages">;
|
|
195
|
-
_creationTime: number;
|
|
196
188
|
id?: string | undefined;
|
|
197
189
|
userId?: string | undefined;
|
|
198
|
-
embeddingId?:
|
|
190
|
+
embeddingId?: string | undefined;
|
|
191
|
+
fileIds?: string[] | undefined;
|
|
192
|
+
files?: any[] | undefined;
|
|
199
193
|
error?: string | undefined;
|
|
200
194
|
agentName?: string | undefined;
|
|
201
195
|
model?: string | undefined;
|
|
@@ -276,12 +270,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
276
270
|
} | undefined;
|
|
277
271
|
text?: string | undefined;
|
|
278
272
|
reasoning?: string | undefined;
|
|
279
|
-
files?: {
|
|
280
|
-
data?: string | ArrayBuffer | undefined;
|
|
281
|
-
url?: string | undefined;
|
|
282
|
-
fileId?: import("convex/values").GenericId<"files"> | undefined;
|
|
283
|
-
mimeType: string;
|
|
284
|
-
}[] | undefined;
|
|
285
273
|
usage?: {
|
|
286
274
|
promptTokens: number;
|
|
287
275
|
completionTokens: number;
|
|
@@ -292,8 +280,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
292
280
|
title?: string | undefined;
|
|
293
281
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
294
282
|
id: string;
|
|
295
|
-
url: string;
|
|
296
283
|
sourceType: "url";
|
|
284
|
+
url: string;
|
|
297
285
|
}[] | undefined;
|
|
298
286
|
reasoningDetails?: ({
|
|
299
287
|
signature?: string | undefined;
|
|
@@ -316,11 +304,11 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
316
304
|
message: string;
|
|
317
305
|
})[] | undefined;
|
|
318
306
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
319
|
-
|
|
320
|
-
|
|
307
|
+
_id: string;
|
|
308
|
+
_creationTime: number;
|
|
321
309
|
status: "pending" | "success" | "failed";
|
|
322
310
|
order: number;
|
|
323
|
-
threadId:
|
|
311
|
+
threadId: string;
|
|
324
312
|
stepOrder: number;
|
|
325
313
|
tool: boolean;
|
|
326
314
|
}[];
|
|
@@ -331,6 +319,8 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
331
319
|
id?: string | undefined;
|
|
332
320
|
userId?: string | undefined;
|
|
333
321
|
embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
|
|
322
|
+
fileIds?: import("convex/values").GenericId<"files">[] | undefined;
|
|
323
|
+
files?: any[] | undefined;
|
|
334
324
|
error?: string | undefined;
|
|
335
325
|
agentName?: string | undefined;
|
|
336
326
|
model?: string | undefined;
|
|
@@ -411,12 +401,6 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
411
401
|
} | undefined;
|
|
412
402
|
text?: string | undefined;
|
|
413
403
|
reasoning?: string | undefined;
|
|
414
|
-
files?: {
|
|
415
|
-
data?: string | ArrayBuffer | undefined;
|
|
416
|
-
url?: string | undefined;
|
|
417
|
-
fileId?: import("convex/values").GenericId<"files"> | undefined;
|
|
418
|
-
mimeType: string;
|
|
419
|
-
}[] | undefined;
|
|
420
404
|
usage?: {
|
|
421
405
|
promptTokens: number;
|
|
422
406
|
completionTokens: number;
|
|
@@ -427,8 +411,8 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
427
411
|
title?: string | undefined;
|
|
428
412
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
429
413
|
id: string;
|
|
430
|
-
url: string;
|
|
431
414
|
sourceType: "url";
|
|
415
|
+
url: string;
|
|
432
416
|
}[] | undefined;
|
|
433
417
|
reasoningDetails?: ({
|
|
434
418
|
signature?: string | undefined;
|
|
@@ -452,435 +436,13 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
452
436
|
})[] | undefined;
|
|
453
437
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
454
438
|
parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
455
|
-
stepId?:
|
|
439
|
+
stepId?: string | undefined;
|
|
456
440
|
status: "pending" | "success" | "failed";
|
|
457
441
|
order: number;
|
|
458
442
|
threadId: import("convex/values").GenericId<"threads">;
|
|
459
443
|
stepOrder: number;
|
|
460
444
|
tool: boolean;
|
|
461
445
|
} | null>;
|
|
462
|
-
export declare const addStep: import("convex/server").RegisteredMutation<"public", {
|
|
463
|
-
userId?: string | undefined;
|
|
464
|
-
failPendingSteps?: boolean | undefined;
|
|
465
|
-
threadId: import("convex/values").GenericId<"threads">;
|
|
466
|
-
step: {
|
|
467
|
-
embeddings?: {
|
|
468
|
-
model: string;
|
|
469
|
-
dimension: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
|
|
470
|
-
vectors: (number[] | null)[];
|
|
471
|
-
} | undefined;
|
|
472
|
-
messages: {
|
|
473
|
-
id?: string | undefined;
|
|
474
|
-
error?: string | undefined;
|
|
475
|
-
model?: string | undefined;
|
|
476
|
-
provider?: string | undefined;
|
|
477
|
-
text?: string | undefined;
|
|
478
|
-
reasoning?: string | undefined;
|
|
479
|
-
files?: {
|
|
480
|
-
data?: string | ArrayBuffer | undefined;
|
|
481
|
-
url?: string | undefined;
|
|
482
|
-
fileId?: import("convex/values").GenericId<"files"> | undefined;
|
|
483
|
-
mimeType: string;
|
|
484
|
-
}[] | undefined;
|
|
485
|
-
usage?: {
|
|
486
|
-
promptTokens: number;
|
|
487
|
-
completionTokens: number;
|
|
488
|
-
totalTokens: number;
|
|
489
|
-
} | undefined;
|
|
490
|
-
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
491
|
-
sources?: {
|
|
492
|
-
title?: string | undefined;
|
|
493
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
494
|
-
id: string;
|
|
495
|
-
url: string;
|
|
496
|
-
sourceType: "url";
|
|
497
|
-
}[] | undefined;
|
|
498
|
-
reasoningDetails?: ({
|
|
499
|
-
signature?: string | undefined;
|
|
500
|
-
type: "text";
|
|
501
|
-
text: string;
|
|
502
|
-
} | {
|
|
503
|
-
type: "redacted";
|
|
504
|
-
data: string;
|
|
505
|
-
})[] | undefined;
|
|
506
|
-
warnings?: ({
|
|
507
|
-
details?: string | undefined;
|
|
508
|
-
type: "unsupported-setting";
|
|
509
|
-
setting: string;
|
|
510
|
-
} | {
|
|
511
|
-
details?: string | undefined;
|
|
512
|
-
type: "unsupported-tool";
|
|
513
|
-
tool: any;
|
|
514
|
-
} | {
|
|
515
|
-
type: "other";
|
|
516
|
-
message: string;
|
|
517
|
-
})[] | undefined;
|
|
518
|
-
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
519
|
-
message: {
|
|
520
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
521
|
-
role: "user";
|
|
522
|
-
content: string | ({
|
|
523
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
524
|
-
type: "text";
|
|
525
|
-
text: string;
|
|
526
|
-
} | {
|
|
527
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
528
|
-
mimeType?: string | undefined;
|
|
529
|
-
type: "image";
|
|
530
|
-
image: string | ArrayBuffer;
|
|
531
|
-
} | {
|
|
532
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
533
|
-
filename?: string | undefined;
|
|
534
|
-
type: "file";
|
|
535
|
-
mimeType: string;
|
|
536
|
-
data: string | ArrayBuffer;
|
|
537
|
-
})[];
|
|
538
|
-
} | {
|
|
539
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
540
|
-
role: "assistant";
|
|
541
|
-
content: string | ({
|
|
542
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
543
|
-
type: "text";
|
|
544
|
-
text: string;
|
|
545
|
-
} | {
|
|
546
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
547
|
-
filename?: string | undefined;
|
|
548
|
-
type: "file";
|
|
549
|
-
mimeType: string;
|
|
550
|
-
data: string | ArrayBuffer;
|
|
551
|
-
} | {
|
|
552
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
553
|
-
signature?: string | undefined;
|
|
554
|
-
type: "reasoning";
|
|
555
|
-
text: string;
|
|
556
|
-
} | {
|
|
557
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
558
|
-
type: "redacted-reasoning";
|
|
559
|
-
data: string;
|
|
560
|
-
} | {
|
|
561
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
562
|
-
type: "tool-call";
|
|
563
|
-
toolCallId: string;
|
|
564
|
-
toolName: string;
|
|
565
|
-
args: any;
|
|
566
|
-
})[];
|
|
567
|
-
} | {
|
|
568
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
569
|
-
role: "tool";
|
|
570
|
-
content: {
|
|
571
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
572
|
-
args?: any;
|
|
573
|
-
experimental_content?: ({
|
|
574
|
-
type: "text";
|
|
575
|
-
text: string;
|
|
576
|
-
} | {
|
|
577
|
-
mimeType?: string | undefined;
|
|
578
|
-
type: "image";
|
|
579
|
-
data: string;
|
|
580
|
-
})[] | undefined;
|
|
581
|
-
isError?: boolean | undefined;
|
|
582
|
-
type: "tool-result";
|
|
583
|
-
toolCallId: string;
|
|
584
|
-
toolName: string;
|
|
585
|
-
result: any;
|
|
586
|
-
}[];
|
|
587
|
-
} | {
|
|
588
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
589
|
-
role: "system";
|
|
590
|
-
content: string;
|
|
591
|
-
};
|
|
592
|
-
}[];
|
|
593
|
-
step: {
|
|
594
|
-
reasoning?: string | undefined;
|
|
595
|
-
files?: any[] | undefined;
|
|
596
|
-
usage?: {
|
|
597
|
-
promptTokens: number;
|
|
598
|
-
completionTokens: number;
|
|
599
|
-
totalTokens: number;
|
|
600
|
-
} | undefined;
|
|
601
|
-
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
602
|
-
sources?: {
|
|
603
|
-
title?: string | undefined;
|
|
604
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
605
|
-
id: string;
|
|
606
|
-
url: string;
|
|
607
|
-
sourceType: "url";
|
|
608
|
-
}[] | undefined;
|
|
609
|
-
reasoningDetails?: ({
|
|
610
|
-
signature?: string | undefined;
|
|
611
|
-
type: "text";
|
|
612
|
-
text: string;
|
|
613
|
-
} | {
|
|
614
|
-
type: "redacted";
|
|
615
|
-
data: string;
|
|
616
|
-
})[] | undefined;
|
|
617
|
-
warnings?: ({
|
|
618
|
-
details?: string | undefined;
|
|
619
|
-
type: "unsupported-setting";
|
|
620
|
-
setting: string;
|
|
621
|
-
} | {
|
|
622
|
-
details?: string | undefined;
|
|
623
|
-
type: "unsupported-tool";
|
|
624
|
-
tool: any;
|
|
625
|
-
} | {
|
|
626
|
-
type: "other";
|
|
627
|
-
message: string;
|
|
628
|
-
})[] | undefined;
|
|
629
|
-
logprobs?: any;
|
|
630
|
-
experimental_providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
631
|
-
request?: {
|
|
632
|
-
url?: string | undefined;
|
|
633
|
-
body?: any;
|
|
634
|
-
headers?: Record<string, string> | undefined;
|
|
635
|
-
method?: string | undefined;
|
|
636
|
-
} | undefined;
|
|
637
|
-
response?: {
|
|
638
|
-
body?: any;
|
|
639
|
-
headers?: Record<string, string> | undefined;
|
|
640
|
-
id: string;
|
|
641
|
-
messages: {
|
|
642
|
-
id?: string | undefined;
|
|
643
|
-
fileId?: import("convex/values").GenericId<"files"> | undefined;
|
|
644
|
-
message: {
|
|
645
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
646
|
-
role: "user";
|
|
647
|
-
content: string | ({
|
|
648
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
649
|
-
type: "text";
|
|
650
|
-
text: string;
|
|
651
|
-
} | {
|
|
652
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
653
|
-
mimeType?: string | undefined;
|
|
654
|
-
type: "image";
|
|
655
|
-
image: string | ArrayBuffer;
|
|
656
|
-
} | {
|
|
657
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
658
|
-
filename?: string | undefined;
|
|
659
|
-
type: "file";
|
|
660
|
-
mimeType: string;
|
|
661
|
-
data: string | ArrayBuffer;
|
|
662
|
-
})[];
|
|
663
|
-
} | {
|
|
664
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
665
|
-
role: "assistant";
|
|
666
|
-
content: string | ({
|
|
667
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
668
|
-
type: "text";
|
|
669
|
-
text: string;
|
|
670
|
-
} | {
|
|
671
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
672
|
-
filename?: string | undefined;
|
|
673
|
-
type: "file";
|
|
674
|
-
mimeType: string;
|
|
675
|
-
data: string | ArrayBuffer;
|
|
676
|
-
} | {
|
|
677
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
678
|
-
signature?: string | undefined;
|
|
679
|
-
type: "reasoning";
|
|
680
|
-
text: string;
|
|
681
|
-
} | {
|
|
682
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
683
|
-
type: "redacted-reasoning";
|
|
684
|
-
data: string;
|
|
685
|
-
} | {
|
|
686
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
687
|
-
type: "tool-call";
|
|
688
|
-
toolCallId: string;
|
|
689
|
-
toolName: string;
|
|
690
|
-
args: any;
|
|
691
|
-
})[];
|
|
692
|
-
} | {
|
|
693
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
694
|
-
role: "tool";
|
|
695
|
-
content: {
|
|
696
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
697
|
-
args?: any;
|
|
698
|
-
experimental_content?: ({
|
|
699
|
-
type: "text";
|
|
700
|
-
text: string;
|
|
701
|
-
} | {
|
|
702
|
-
mimeType?: string | undefined;
|
|
703
|
-
type: "image";
|
|
704
|
-
data: string;
|
|
705
|
-
})[] | undefined;
|
|
706
|
-
isError?: boolean | undefined;
|
|
707
|
-
type: "tool-result";
|
|
708
|
-
toolCallId: string;
|
|
709
|
-
toolName: string;
|
|
710
|
-
result: any;
|
|
711
|
-
}[];
|
|
712
|
-
} | {
|
|
713
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
714
|
-
role: "system";
|
|
715
|
-
content: string;
|
|
716
|
-
};
|
|
717
|
-
}[];
|
|
718
|
-
timestamp: number;
|
|
719
|
-
modelId: string;
|
|
720
|
-
} | undefined;
|
|
721
|
-
text: string;
|
|
722
|
-
finishReason: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown";
|
|
723
|
-
isContinued: boolean;
|
|
724
|
-
stepType: "tool-result" | "initial" | "continue";
|
|
725
|
-
toolCalls: {
|
|
726
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
727
|
-
type: "tool-call";
|
|
728
|
-
toolCallId: string;
|
|
729
|
-
toolName: string;
|
|
730
|
-
args: any;
|
|
731
|
-
}[];
|
|
732
|
-
toolResults: {
|
|
733
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
734
|
-
args?: any;
|
|
735
|
-
experimental_content?: ({
|
|
736
|
-
type: "text";
|
|
737
|
-
text: string;
|
|
738
|
-
} | {
|
|
739
|
-
mimeType?: string | undefined;
|
|
740
|
-
type: "image";
|
|
741
|
-
data: string;
|
|
742
|
-
})[] | undefined;
|
|
743
|
-
isError?: boolean | undefined;
|
|
744
|
-
type: "tool-result";
|
|
745
|
-
toolCallId: string;
|
|
746
|
-
toolName: string;
|
|
747
|
-
result: any;
|
|
748
|
-
}[];
|
|
749
|
-
};
|
|
750
|
-
};
|
|
751
|
-
promptMessageId: import("convex/values").GenericId<"messages">;
|
|
752
|
-
}, Promise<{
|
|
753
|
-
id?: string | undefined;
|
|
754
|
-
userId?: string | undefined;
|
|
755
|
-
embeddingId?: string | undefined;
|
|
756
|
-
error?: string | undefined;
|
|
757
|
-
agentName?: string | undefined;
|
|
758
|
-
model?: string | undefined;
|
|
759
|
-
provider?: string | undefined;
|
|
760
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
761
|
-
message?: {
|
|
762
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
763
|
-
role: "user";
|
|
764
|
-
content: string | ({
|
|
765
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
766
|
-
type: "text";
|
|
767
|
-
text: string;
|
|
768
|
-
} | {
|
|
769
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
770
|
-
mimeType?: string | undefined;
|
|
771
|
-
type: "image";
|
|
772
|
-
image: string | ArrayBuffer;
|
|
773
|
-
} | {
|
|
774
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
775
|
-
filename?: string | undefined;
|
|
776
|
-
type: "file";
|
|
777
|
-
mimeType: string;
|
|
778
|
-
data: string | ArrayBuffer;
|
|
779
|
-
})[];
|
|
780
|
-
} | {
|
|
781
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
782
|
-
role: "assistant";
|
|
783
|
-
content: string | ({
|
|
784
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
785
|
-
type: "text";
|
|
786
|
-
text: string;
|
|
787
|
-
} | {
|
|
788
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
789
|
-
filename?: string | undefined;
|
|
790
|
-
type: "file";
|
|
791
|
-
mimeType: string;
|
|
792
|
-
data: string | ArrayBuffer;
|
|
793
|
-
} | {
|
|
794
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
795
|
-
signature?: string | undefined;
|
|
796
|
-
type: "reasoning";
|
|
797
|
-
text: string;
|
|
798
|
-
} | {
|
|
799
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
800
|
-
type: "redacted-reasoning";
|
|
801
|
-
data: string;
|
|
802
|
-
} | {
|
|
803
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
804
|
-
type: "tool-call";
|
|
805
|
-
toolCallId: string;
|
|
806
|
-
toolName: string;
|
|
807
|
-
args: any;
|
|
808
|
-
})[];
|
|
809
|
-
} | {
|
|
810
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
811
|
-
role: "tool";
|
|
812
|
-
content: {
|
|
813
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
814
|
-
args?: any;
|
|
815
|
-
experimental_content?: ({
|
|
816
|
-
type: "text";
|
|
817
|
-
text: string;
|
|
818
|
-
} | {
|
|
819
|
-
mimeType?: string | undefined;
|
|
820
|
-
type: "image";
|
|
821
|
-
data: string;
|
|
822
|
-
})[] | undefined;
|
|
823
|
-
isError?: boolean | undefined;
|
|
824
|
-
type: "tool-result";
|
|
825
|
-
toolCallId: string;
|
|
826
|
-
toolName: string;
|
|
827
|
-
result: any;
|
|
828
|
-
}[];
|
|
829
|
-
} | {
|
|
830
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
831
|
-
role: "system";
|
|
832
|
-
content: string;
|
|
833
|
-
} | undefined;
|
|
834
|
-
text?: string | undefined;
|
|
835
|
-
reasoning?: string | undefined;
|
|
836
|
-
files?: {
|
|
837
|
-
data?: string | ArrayBuffer | undefined;
|
|
838
|
-
url?: string | undefined;
|
|
839
|
-
fileId?: string | undefined;
|
|
840
|
-
mimeType: string;
|
|
841
|
-
}[] | undefined;
|
|
842
|
-
usage?: {
|
|
843
|
-
promptTokens: number;
|
|
844
|
-
completionTokens: number;
|
|
845
|
-
totalTokens: number;
|
|
846
|
-
} | undefined;
|
|
847
|
-
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
848
|
-
sources?: {
|
|
849
|
-
title?: string | undefined;
|
|
850
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
851
|
-
id: string;
|
|
852
|
-
url: string;
|
|
853
|
-
sourceType: "url";
|
|
854
|
-
}[] | undefined;
|
|
855
|
-
reasoningDetails?: ({
|
|
856
|
-
signature?: string | undefined;
|
|
857
|
-
type: "text";
|
|
858
|
-
text: string;
|
|
859
|
-
} | {
|
|
860
|
-
type: "redacted";
|
|
861
|
-
data: string;
|
|
862
|
-
})[] | undefined;
|
|
863
|
-
warnings?: ({
|
|
864
|
-
details?: string | undefined;
|
|
865
|
-
type: "unsupported-setting";
|
|
866
|
-
setting: string;
|
|
867
|
-
} | {
|
|
868
|
-
details?: string | undefined;
|
|
869
|
-
type: "unsupported-tool";
|
|
870
|
-
tool: any;
|
|
871
|
-
} | {
|
|
872
|
-
type: "other";
|
|
873
|
-
message: string;
|
|
874
|
-
})[] | undefined;
|
|
875
|
-
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
876
|
-
_id: string;
|
|
877
|
-
_creationTime: number;
|
|
878
|
-
status: "pending" | "success" | "failed";
|
|
879
|
-
order: number;
|
|
880
|
-
threadId: string;
|
|
881
|
-
stepOrder: number;
|
|
882
|
-
tool: boolean;
|
|
883
|
-
}[]>>;
|
|
884
446
|
export declare const rollbackMessage: import("convex/server").RegisteredMutation<"public", {
|
|
885
447
|
error?: string | undefined;
|
|
886
448
|
messageId: import("convex/values").GenericId<"messages">;
|
|
@@ -908,6 +470,8 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
908
470
|
id?: string | undefined;
|
|
909
471
|
userId?: string | undefined;
|
|
910
472
|
embeddingId?: string | undefined;
|
|
473
|
+
fileIds?: string[] | undefined;
|
|
474
|
+
files?: any[] | undefined;
|
|
911
475
|
error?: string | undefined;
|
|
912
476
|
agentName?: string | undefined;
|
|
913
477
|
model?: string | undefined;
|
|
@@ -988,12 +552,6 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
988
552
|
} | undefined;
|
|
989
553
|
text?: string | undefined;
|
|
990
554
|
reasoning?: string | undefined;
|
|
991
|
-
files?: {
|
|
992
|
-
data?: string | ArrayBuffer | undefined;
|
|
993
|
-
url?: string | undefined;
|
|
994
|
-
fileId?: string | undefined;
|
|
995
|
-
mimeType: string;
|
|
996
|
-
}[] | undefined;
|
|
997
555
|
usage?: {
|
|
998
556
|
promptTokens: number;
|
|
999
557
|
completionTokens: number;
|
|
@@ -1004,8 +562,8 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
1004
562
|
title?: string | undefined;
|
|
1005
563
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1006
564
|
id: string;
|
|
1007
|
-
url: string;
|
|
1008
565
|
sourceType: "url";
|
|
566
|
+
url: string;
|
|
1009
567
|
}[] | undefined;
|
|
1010
568
|
reasoningDetails?: ({
|
|
1011
569
|
signature?: string | undefined;
|
|
@@ -1049,6 +607,8 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
1049
607
|
id?: string | undefined;
|
|
1050
608
|
userId?: string | undefined;
|
|
1051
609
|
embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
|
|
610
|
+
fileIds?: import("convex/values").GenericId<"files">[] | undefined;
|
|
611
|
+
files?: any[] | undefined;
|
|
1052
612
|
error?: string | undefined;
|
|
1053
613
|
agentName?: string | undefined;
|
|
1054
614
|
model?: string | undefined;
|
|
@@ -1129,12 +689,6 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
1129
689
|
} | undefined;
|
|
1130
690
|
text?: string | undefined;
|
|
1131
691
|
reasoning?: string | undefined;
|
|
1132
|
-
files?: {
|
|
1133
|
-
data?: string | ArrayBuffer | undefined;
|
|
1134
|
-
url?: string | undefined;
|
|
1135
|
-
fileId?: import("convex/values").GenericId<"files"> | undefined;
|
|
1136
|
-
mimeType: string;
|
|
1137
|
-
}[] | undefined;
|
|
1138
692
|
usage?: {
|
|
1139
693
|
promptTokens: number;
|
|
1140
694
|
completionTokens: number;
|
|
@@ -1145,8 +699,8 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
1145
699
|
title?: string | undefined;
|
|
1146
700
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1147
701
|
id: string;
|
|
1148
|
-
url: string;
|
|
1149
702
|
sourceType: "url";
|
|
703
|
+
url: string;
|
|
1150
704
|
}[] | undefined;
|
|
1151
705
|
reasoningDetails?: ({
|
|
1152
706
|
signature?: string | undefined;
|
|
@@ -1170,7 +724,7 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
1170
724
|
})[] | undefined;
|
|
1171
725
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1172
726
|
parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1173
|
-
stepId?:
|
|
727
|
+
stepId?: string | undefined;
|
|
1174
728
|
status: "pending" | "success" | "failed";
|
|
1175
729
|
order: number;
|
|
1176
730
|
threadId: import("convex/values").GenericId<"threads">;
|
|
@@ -1191,13 +745,15 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1191
745
|
before: number;
|
|
1192
746
|
after: number;
|
|
1193
747
|
} | undefined;
|
|
1194
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
1195
748
|
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
749
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
1196
750
|
limit: number;
|
|
1197
751
|
}, Promise<{
|
|
1198
752
|
id?: string | undefined;
|
|
1199
753
|
userId?: string | undefined;
|
|
1200
754
|
embeddingId?: string | undefined;
|
|
755
|
+
fileIds?: string[] | undefined;
|
|
756
|
+
files?: any[] | undefined;
|
|
1201
757
|
error?: string | undefined;
|
|
1202
758
|
agentName?: string | undefined;
|
|
1203
759
|
model?: string | undefined;
|
|
@@ -1278,12 +834,6 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1278
834
|
} | undefined;
|
|
1279
835
|
text?: string | undefined;
|
|
1280
836
|
reasoning?: string | undefined;
|
|
1281
|
-
files?: {
|
|
1282
|
-
data?: string | ArrayBuffer | undefined;
|
|
1283
|
-
url?: string | undefined;
|
|
1284
|
-
fileId?: string | undefined;
|
|
1285
|
-
mimeType: string;
|
|
1286
|
-
}[] | undefined;
|
|
1287
837
|
usage?: {
|
|
1288
838
|
promptTokens: number;
|
|
1289
839
|
completionTokens: number;
|
|
@@ -1294,8 +844,8 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1294
844
|
title?: string | undefined;
|
|
1295
845
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1296
846
|
id: string;
|
|
1297
|
-
url: string;
|
|
1298
847
|
sourceType: "url";
|
|
848
|
+
url: string;
|
|
1299
849
|
}[] | undefined;
|
|
1300
850
|
reasoningDetails?: ({
|
|
1301
851
|
signature?: string | undefined;
|
|
@@ -1328,12 +878,14 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1328
878
|
}[]>>;
|
|
1329
879
|
export declare const _fetchSearchMessages: import("convex/server").RegisteredQuery<"internal", {
|
|
1330
880
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
1331
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
1332
881
|
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
882
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
1333
883
|
textSearchMessages?: {
|
|
1334
884
|
id?: string | undefined;
|
|
1335
885
|
userId?: string | undefined;
|
|
1336
886
|
embeddingId?: string | undefined;
|
|
887
|
+
fileIds?: string[] | undefined;
|
|
888
|
+
files?: any[] | undefined;
|
|
1337
889
|
error?: string | undefined;
|
|
1338
890
|
agentName?: string | undefined;
|
|
1339
891
|
model?: string | undefined;
|
|
@@ -1414,12 +966,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1414
966
|
} | undefined;
|
|
1415
967
|
text?: string | undefined;
|
|
1416
968
|
reasoning?: string | undefined;
|
|
1417
|
-
files?: {
|
|
1418
|
-
data?: string | ArrayBuffer | undefined;
|
|
1419
|
-
url?: string | undefined;
|
|
1420
|
-
fileId?: string | undefined;
|
|
1421
|
-
mimeType: string;
|
|
1422
|
-
}[] | undefined;
|
|
1423
969
|
usage?: {
|
|
1424
970
|
promptTokens: number;
|
|
1425
971
|
completionTokens: number;
|
|
@@ -1430,8 +976,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1430
976
|
title?: string | undefined;
|
|
1431
977
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1432
978
|
id: string;
|
|
1433
|
-
url: string;
|
|
1434
979
|
sourceType: "url";
|
|
980
|
+
url: string;
|
|
1435
981
|
}[] | undefined;
|
|
1436
982
|
reasoningDetails?: ({
|
|
1437
983
|
signature?: string | undefined;
|
|
@@ -1472,6 +1018,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1472
1018
|
id?: string | undefined;
|
|
1473
1019
|
userId?: string | undefined;
|
|
1474
1020
|
embeddingId?: string | undefined;
|
|
1021
|
+
fileIds?: string[] | undefined;
|
|
1022
|
+
files?: any[] | undefined;
|
|
1475
1023
|
error?: string | undefined;
|
|
1476
1024
|
agentName?: string | undefined;
|
|
1477
1025
|
model?: string | undefined;
|
|
@@ -1552,12 +1100,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1552
1100
|
} | undefined;
|
|
1553
1101
|
text?: string | undefined;
|
|
1554
1102
|
reasoning?: string | undefined;
|
|
1555
|
-
files?: {
|
|
1556
|
-
data?: string | ArrayBuffer | undefined;
|
|
1557
|
-
url?: string | undefined;
|
|
1558
|
-
fileId?: string | undefined;
|
|
1559
|
-
mimeType: string;
|
|
1560
|
-
}[] | undefined;
|
|
1561
1103
|
usage?: {
|
|
1562
1104
|
promptTokens: number;
|
|
1563
1105
|
completionTokens: number;
|
|
@@ -1568,8 +1110,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1568
1110
|
title?: string | undefined;
|
|
1569
1111
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1570
1112
|
id: string;
|
|
1571
|
-
url: string;
|
|
1572
1113
|
sourceType: "url";
|
|
1114
|
+
url: string;
|
|
1573
1115
|
}[] | undefined;
|
|
1574
1116
|
reasoningDetails?: ({
|
|
1575
1117
|
signature?: string | undefined;
|
|
@@ -1602,14 +1144,16 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1602
1144
|
}[]>>;
|
|
1603
1145
|
export declare const textSearch: import("convex/server").RegisteredQuery<"public", {
|
|
1604
1146
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
1605
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
1606
1147
|
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1148
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
1607
1149
|
text: string;
|
|
1608
1150
|
limit: number;
|
|
1609
1151
|
}, Promise<{
|
|
1610
1152
|
id?: string | undefined;
|
|
1611
1153
|
userId?: string | undefined;
|
|
1612
1154
|
embeddingId?: string | undefined;
|
|
1155
|
+
fileIds?: string[] | undefined;
|
|
1156
|
+
files?: any[] | undefined;
|
|
1613
1157
|
error?: string | undefined;
|
|
1614
1158
|
agentName?: string | undefined;
|
|
1615
1159
|
model?: string | undefined;
|
|
@@ -1690,12 +1234,6 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1690
1234
|
} | undefined;
|
|
1691
1235
|
text?: string | undefined;
|
|
1692
1236
|
reasoning?: string | undefined;
|
|
1693
|
-
files?: {
|
|
1694
|
-
data?: string | ArrayBuffer | undefined;
|
|
1695
|
-
url?: string | undefined;
|
|
1696
|
-
fileId?: string | undefined;
|
|
1697
|
-
mimeType: string;
|
|
1698
|
-
}[] | undefined;
|
|
1699
1237
|
usage?: {
|
|
1700
1238
|
promptTokens: number;
|
|
1701
1239
|
completionTokens: number;
|
|
@@ -1706,8 +1244,8 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1706
1244
|
title?: string | undefined;
|
|
1707
1245
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1708
1246
|
id: string;
|
|
1709
|
-
url: string;
|
|
1710
1247
|
sourceType: "url";
|
|
1248
|
+
url: string;
|
|
1711
1249
|
}[] | undefined;
|
|
1712
1250
|
reasoningDetails?: ({
|
|
1713
1251
|
signature?: string | undefined;
|