@convex-dev/agent 0.1.9-alpha.5 → 0.1.9-alpha.7
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/commonjs/client/index.d.ts +71 -71
- package/dist/commonjs/component/messages.d.ts +210 -210
- package/dist/commonjs/component/schema.d.ts +563 -563
- package/dist/commonjs/component/streams.d.ts +11 -11
- package/dist/commonjs/component/threads.d.ts +18 -18
- package/dist/commonjs/component/vector/index.d.ts +3 -3
- package/dist/commonjs/component/vector/tables.d.ts +5 -3
- package/dist/commonjs/component/vector/tables.d.ts.map +1 -1
- package/dist/commonjs/react/index.d.ts +1 -1
- package/dist/commonjs/react/index.d.ts.map +1 -1
- package/dist/commonjs/react/index.js +7 -5
- package/dist/commonjs/react/index.js.map +1 -1
- package/dist/commonjs/validators.d.ts +160 -160
- package/dist/commonjs.tsbuildinfo +1 -1
- package/dist/esm/client/index.d.ts +19 -19
- package/dist/esm/component/messages.d.ts +37 -37
- package/dist/esm/component/schema.d.ts +563 -563
- package/dist/esm/component/threads.d.ts +15 -15
- package/dist/esm/component/vector/index.d.ts +3 -3
- package/dist/esm/component/vector/tables.d.ts +5 -3
- package/dist/esm/component/vector/tables.d.ts.map +1 -1
- package/dist/esm/react/index.d.ts +1 -1
- package/dist/esm/react/index.d.ts.map +1 -1
- package/dist/esm/react/index.js +7 -5
- package/dist/esm/react/index.js.map +1 -1
- package/dist/esm/validators.d.ts +160 -160
- package/dist/esm.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/react/index.ts +7 -6
|
@@ -14,12 +14,12 @@ export declare const listThreadsByUserId: import("convex/server").RegisteredQuer
|
|
|
14
14
|
} | undefined;
|
|
15
15
|
}, Promise<{
|
|
16
16
|
page: {
|
|
17
|
-
title?: string | undefined;
|
|
18
17
|
userId?: string | undefined;
|
|
18
|
+
title?: string | undefined;
|
|
19
19
|
summary?: string | undefined;
|
|
20
|
-
status: "active" | "archived";
|
|
21
|
-
_creationTime: number;
|
|
22
20
|
_id: string;
|
|
21
|
+
_creationTime: number;
|
|
22
|
+
status: "active" | "archived";
|
|
23
23
|
}[];
|
|
24
24
|
isDone: boolean;
|
|
25
25
|
continueCursor: import("convex/server").Cursor;
|
|
@@ -30,55 +30,60 @@ export declare const listThreadsByUserId: import("convex/server").RegisteredQuer
|
|
|
30
30
|
export declare const getThread: import("convex/server").RegisteredQuery<"public", {
|
|
31
31
|
threadId: import("convex/values").GenericId<"threads">;
|
|
32
32
|
}, Promise<{
|
|
33
|
-
title?: string | undefined;
|
|
34
33
|
userId?: string | undefined;
|
|
34
|
+
title?: string | undefined;
|
|
35
35
|
summary?: string | undefined;
|
|
36
|
-
status: "active" | "archived";
|
|
37
|
-
_creationTime: number;
|
|
38
36
|
_id: string;
|
|
37
|
+
_creationTime: number;
|
|
38
|
+
status: "active" | "archived";
|
|
39
39
|
} | null>>;
|
|
40
40
|
/** @deprecated Use *.threads.updateThread instead */
|
|
41
41
|
export declare const updateThread: import("convex/server").RegisteredMutation<"public", {
|
|
42
42
|
threadId: import("convex/values").GenericId<"threads">;
|
|
43
43
|
patch: {
|
|
44
|
-
title?: string | undefined;
|
|
45
44
|
status?: "active" | "archived" | undefined;
|
|
45
|
+
title?: string | undefined;
|
|
46
46
|
summary?: string | undefined;
|
|
47
47
|
};
|
|
48
48
|
}, Promise<{
|
|
49
|
-
title?: string | undefined;
|
|
50
49
|
userId?: string | undefined;
|
|
50
|
+
title?: string | undefined;
|
|
51
51
|
summary?: string | undefined;
|
|
52
|
-
status: "active" | "archived";
|
|
53
|
-
_creationTime: number;
|
|
54
52
|
_id: string;
|
|
53
|
+
_creationTime: number;
|
|
54
|
+
status: "active" | "archived";
|
|
55
55
|
}>>;
|
|
56
56
|
export declare function deleteMessage(ctx: MutationCtx, messageDoc: Doc<"messages">): Promise<void>;
|
|
57
57
|
export declare const messageStatuses: ("pending" | "success" | "failed")[];
|
|
58
58
|
export declare const addMessages: import("convex/server").RegisteredMutation<"public", {
|
|
59
|
-
pending?: boolean | undefined;
|
|
60
|
-
promptMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
61
59
|
userId?: string | undefined;
|
|
60
|
+
pending?: boolean | undefined;
|
|
62
61
|
agentName?: string | undefined;
|
|
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
|
-
|
|
69
|
+
threadId: import("convex/values").GenericId<"threads">;
|
|
69
70
|
messages: {
|
|
70
71
|
id?: string | undefined;
|
|
71
|
-
text?: string | undefined;
|
|
72
|
-
reasoning?: string | undefined;
|
|
73
|
-
error?: string | undefined;
|
|
74
72
|
fileIds?: import("convex/values").GenericId<"files">[] | undefined;
|
|
75
|
-
|
|
73
|
+
error?: string | undefined;
|
|
76
74
|
model?: string | undefined;
|
|
77
75
|
provider?: string | undefined;
|
|
76
|
+
text?: string | undefined;
|
|
77
|
+
reasoning?: string | undefined;
|
|
78
|
+
usage?: {
|
|
79
|
+
promptTokens: number;
|
|
80
|
+
completionTokens: number;
|
|
81
|
+
totalTokens: number;
|
|
82
|
+
} | undefined;
|
|
78
83
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
79
84
|
sources?: {
|
|
80
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
81
85
|
title?: string | undefined;
|
|
86
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
82
87
|
id: string;
|
|
83
88
|
sourceType: "url";
|
|
84
89
|
url: string;
|
|
@@ -91,11 +96,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
91
96
|
type: "redacted";
|
|
92
97
|
data: string;
|
|
93
98
|
})[] | undefined;
|
|
94
|
-
usage?: {
|
|
95
|
-
promptTokens: number;
|
|
96
|
-
completionTokens: number;
|
|
97
|
-
totalTokens: number;
|
|
98
|
-
} | undefined;
|
|
99
99
|
warnings?: ({
|
|
100
100
|
details?: string | undefined;
|
|
101
101
|
type: "unsupported-setting";
|
|
@@ -108,6 +108,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
108
108
|
type: "other";
|
|
109
109
|
message: string;
|
|
110
110
|
})[] | undefined;
|
|
111
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
111
112
|
message: {
|
|
112
113
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
113
114
|
role: "user";
|
|
@@ -182,13 +183,17 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
182
183
|
content: string;
|
|
183
184
|
};
|
|
184
185
|
}[];
|
|
185
|
-
threadId: import("convex/values").GenericId<"threads">;
|
|
186
186
|
}, Promise<{
|
|
187
187
|
messages: {
|
|
188
188
|
id?: string | undefined;
|
|
189
|
-
|
|
189
|
+
userId?: string | undefined;
|
|
190
|
+
embeddingId?: string | undefined;
|
|
191
|
+
fileIds?: string[] | undefined;
|
|
192
|
+
error?: string | undefined;
|
|
193
|
+
agentName?: string | undefined;
|
|
194
|
+
model?: string | undefined;
|
|
195
|
+
provider?: string | undefined;
|
|
190
196
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
191
|
-
reasoning?: string | undefined;
|
|
192
197
|
message?: {
|
|
193
198
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
194
199
|
role: "user";
|
|
@@ -262,15 +267,17 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
262
267
|
role: "system";
|
|
263
268
|
content: string;
|
|
264
269
|
} | undefined;
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
+
text?: string | undefined;
|
|
271
|
+
reasoning?: string | undefined;
|
|
272
|
+
usage?: {
|
|
273
|
+
promptTokens: number;
|
|
274
|
+
completionTokens: number;
|
|
275
|
+
totalTokens: number;
|
|
276
|
+
} | undefined;
|
|
270
277
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
271
278
|
sources?: {
|
|
272
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
273
279
|
title?: string | undefined;
|
|
280
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
274
281
|
id: string;
|
|
275
282
|
sourceType: "url";
|
|
276
283
|
url: string;
|
|
@@ -283,11 +290,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
283
290
|
type: "redacted";
|
|
284
291
|
data: string;
|
|
285
292
|
})[] | undefined;
|
|
286
|
-
usage?: {
|
|
287
|
-
promptTokens: number;
|
|
288
|
-
completionTokens: number;
|
|
289
|
-
totalTokens: number;
|
|
290
|
-
} | undefined;
|
|
291
293
|
warnings?: ({
|
|
292
294
|
details?: string | undefined;
|
|
293
295
|
type: "unsupported-setting";
|
|
@@ -300,25 +302,29 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
300
302
|
type: "other";
|
|
301
303
|
message: string;
|
|
302
304
|
})[] | undefined;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
tool: boolean;
|
|
307
|
-
threadId: string;
|
|
305
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
306
|
+
_id: string;
|
|
307
|
+
_creationTime: number;
|
|
308
308
|
status: "pending" | "success" | "failed";
|
|
309
309
|
order: number;
|
|
310
|
+
threadId: string;
|
|
310
311
|
stepOrder: number;
|
|
311
|
-
|
|
312
|
-
_id: string;
|
|
312
|
+
tool: boolean;
|
|
313
313
|
}[];
|
|
314
314
|
}>>;
|
|
315
315
|
export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, order?: number): Promise<{
|
|
316
316
|
_id: import("convex/values").GenericId<"messages">;
|
|
317
317
|
_creationTime: number;
|
|
318
318
|
id?: string | undefined;
|
|
319
|
-
|
|
319
|
+
userId?: string | undefined;
|
|
320
|
+
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;
|
|
321
|
+
fileIds?: import("convex/values").GenericId<"files">[] | undefined;
|
|
322
|
+
files?: any[] | undefined;
|
|
323
|
+
error?: string | undefined;
|
|
324
|
+
agentName?: string | undefined;
|
|
325
|
+
model?: string | undefined;
|
|
326
|
+
provider?: string | undefined;
|
|
320
327
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
321
|
-
reasoning?: string | undefined;
|
|
322
328
|
message?: {
|
|
323
329
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
324
330
|
role: "user";
|
|
@@ -392,16 +398,17 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
392
398
|
role: "system";
|
|
393
399
|
content: string;
|
|
394
400
|
} | undefined;
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
+
text?: string | undefined;
|
|
402
|
+
reasoning?: string | undefined;
|
|
403
|
+
usage?: {
|
|
404
|
+
promptTokens: number;
|
|
405
|
+
completionTokens: number;
|
|
406
|
+
totalTokens: number;
|
|
407
|
+
} | undefined;
|
|
401
408
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
402
409
|
sources?: {
|
|
403
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
404
410
|
title?: string | undefined;
|
|
411
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
405
412
|
id: string;
|
|
406
413
|
sourceType: "url";
|
|
407
414
|
url: string;
|
|
@@ -414,11 +421,6 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
414
421
|
type: "redacted";
|
|
415
422
|
data: string;
|
|
416
423
|
})[] | undefined;
|
|
417
|
-
usage?: {
|
|
418
|
-
promptTokens: number;
|
|
419
|
-
completionTokens: number;
|
|
420
|
-
totalTokens: number;
|
|
421
|
-
} | undefined;
|
|
422
424
|
warnings?: ({
|
|
423
425
|
details?: string | undefined;
|
|
424
426
|
type: "unsupported-setting";
|
|
@@ -431,16 +433,14 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
431
433
|
type: "other";
|
|
432
434
|
message: string;
|
|
433
435
|
})[] | undefined;
|
|
434
|
-
|
|
435
|
-
agentName?: string | undefined;
|
|
436
|
-
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;
|
|
436
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
437
437
|
parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
438
438
|
stepId?: string | undefined;
|
|
439
|
-
tool: boolean;
|
|
440
|
-
threadId: import("convex/values").GenericId<"threads">;
|
|
441
439
|
status: "pending" | "success" | "failed";
|
|
442
440
|
order: number;
|
|
441
|
+
threadId: import("convex/values").GenericId<"threads">;
|
|
443
442
|
stepOrder: number;
|
|
443
|
+
tool: boolean;
|
|
444
444
|
} | null>;
|
|
445
445
|
export declare const rollbackMessage: import("convex/server").RegisteredMutation<"public", {
|
|
446
446
|
error?: string | undefined;
|
|
@@ -451,6 +451,8 @@ export declare const commitMessage: import("convex/server").RegisteredMutation<"
|
|
|
451
451
|
}, Promise<void>>;
|
|
452
452
|
export declare const updateMessage: import("convex/server").RegisteredMutation<"public", {
|
|
453
453
|
patch: {
|
|
454
|
+
status?: "pending" | "success" | "failed" | undefined;
|
|
455
|
+
error?: string | undefined;
|
|
454
456
|
message?: {
|
|
455
457
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
456
458
|
role: "user";
|
|
@@ -524,15 +526,18 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
524
526
|
role: "system";
|
|
525
527
|
content: string;
|
|
526
528
|
} | undefined;
|
|
527
|
-
error?: string | undefined;
|
|
528
|
-
status?: "pending" | "success" | "failed" | undefined;
|
|
529
529
|
};
|
|
530
530
|
messageId: import("convex/values").GenericId<"messages">;
|
|
531
531
|
}, Promise<{
|
|
532
532
|
id?: string | undefined;
|
|
533
|
-
|
|
533
|
+
userId?: string | undefined;
|
|
534
|
+
embeddingId?: string | undefined;
|
|
535
|
+
fileIds?: string[] | undefined;
|
|
536
|
+
error?: string | undefined;
|
|
537
|
+
agentName?: string | undefined;
|
|
538
|
+
model?: string | undefined;
|
|
539
|
+
provider?: string | undefined;
|
|
534
540
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
535
|
-
reasoning?: string | undefined;
|
|
536
541
|
message?: {
|
|
537
542
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
538
543
|
role: "user";
|
|
@@ -606,15 +611,17 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
606
611
|
role: "system";
|
|
607
612
|
content: string;
|
|
608
613
|
} | undefined;
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
+
text?: string | undefined;
|
|
615
|
+
reasoning?: string | undefined;
|
|
616
|
+
usage?: {
|
|
617
|
+
promptTokens: number;
|
|
618
|
+
completionTokens: number;
|
|
619
|
+
totalTokens: number;
|
|
620
|
+
} | undefined;
|
|
614
621
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
615
622
|
sources?: {
|
|
616
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
617
623
|
title?: string | undefined;
|
|
624
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
618
625
|
id: string;
|
|
619
626
|
sourceType: "url";
|
|
620
627
|
url: string;
|
|
@@ -627,11 +634,6 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
627
634
|
type: "redacted";
|
|
628
635
|
data: string;
|
|
629
636
|
})[] | undefined;
|
|
630
|
-
usage?: {
|
|
631
|
-
promptTokens: number;
|
|
632
|
-
completionTokens: number;
|
|
633
|
-
totalTokens: number;
|
|
634
|
-
} | undefined;
|
|
635
637
|
warnings?: ({
|
|
636
638
|
details?: string | undefined;
|
|
637
639
|
type: "unsupported-setting";
|
|
@@ -644,20 +646,17 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
644
646
|
type: "other";
|
|
645
647
|
message: string;
|
|
646
648
|
})[] | undefined;
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
tool: boolean;
|
|
651
|
-
threadId: string;
|
|
649
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
650
|
+
_id: string;
|
|
651
|
+
_creationTime: number;
|
|
652
652
|
status: "pending" | "success" | "failed";
|
|
653
653
|
order: number;
|
|
654
|
+
threadId: string;
|
|
654
655
|
stepOrder: number;
|
|
655
|
-
|
|
656
|
-
_id: string;
|
|
656
|
+
tool: boolean;
|
|
657
657
|
}>>;
|
|
658
658
|
export declare const listMessagesByThreadId: import("convex/server").RegisteredQuery<"public", {
|
|
659
659
|
excludeToolMessages?: boolean | undefined;
|
|
660
|
-
statuses?: ("pending" | "success" | "failed")[] | undefined;
|
|
661
660
|
paginationOpts?: {
|
|
662
661
|
id?: number | undefined;
|
|
663
662
|
endCursor?: string | null | undefined;
|
|
@@ -667,15 +666,21 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
667
666
|
cursor: string | null;
|
|
668
667
|
} | undefined;
|
|
669
668
|
isTool?: "use excludeToolMessages instead of this" | undefined;
|
|
669
|
+
statuses?: ("pending" | "success" | "failed")[] | undefined;
|
|
670
670
|
upToAndIncludingMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
671
|
-
threadId: import("convex/values").GenericId<"threads">;
|
|
672
671
|
order: "asc" | "desc";
|
|
672
|
+
threadId: import("convex/values").GenericId<"threads">;
|
|
673
673
|
}, Promise<{
|
|
674
674
|
page: {
|
|
675
675
|
id?: string | undefined;
|
|
676
|
-
|
|
676
|
+
userId?: string | undefined;
|
|
677
|
+
embeddingId?: string | undefined;
|
|
678
|
+
fileIds?: string[] | undefined;
|
|
679
|
+
error?: string | undefined;
|
|
680
|
+
agentName?: string | undefined;
|
|
681
|
+
model?: string | undefined;
|
|
682
|
+
provider?: string | undefined;
|
|
677
683
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
678
|
-
reasoning?: string | undefined;
|
|
679
684
|
message?: {
|
|
680
685
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
681
686
|
role: "user";
|
|
@@ -749,15 +754,17 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
749
754
|
role: "system";
|
|
750
755
|
content: string;
|
|
751
756
|
} | undefined;
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
+
text?: string | undefined;
|
|
758
|
+
reasoning?: string | undefined;
|
|
759
|
+
usage?: {
|
|
760
|
+
promptTokens: number;
|
|
761
|
+
completionTokens: number;
|
|
762
|
+
totalTokens: number;
|
|
763
|
+
} | undefined;
|
|
757
764
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
758
765
|
sources?: {
|
|
759
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
760
766
|
title?: string | undefined;
|
|
767
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
761
768
|
id: string;
|
|
762
769
|
sourceType: "url";
|
|
763
770
|
url: string;
|
|
@@ -770,11 +777,6 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
770
777
|
type: "redacted";
|
|
771
778
|
data: string;
|
|
772
779
|
})[] | undefined;
|
|
773
|
-
usage?: {
|
|
774
|
-
promptTokens: number;
|
|
775
|
-
completionTokens: number;
|
|
776
|
-
totalTokens: number;
|
|
777
|
-
} | undefined;
|
|
778
780
|
warnings?: ({
|
|
779
781
|
details?: string | undefined;
|
|
780
782
|
type: "unsupported-setting";
|
|
@@ -787,16 +789,14 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
787
789
|
type: "other";
|
|
788
790
|
message: string;
|
|
789
791
|
})[] | undefined;
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
tool: boolean;
|
|
794
|
-
threadId: string;
|
|
792
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
793
|
+
_id: string;
|
|
794
|
+
_creationTime: number;
|
|
795
795
|
status: "pending" | "success" | "failed";
|
|
796
796
|
order: number;
|
|
797
|
+
threadId: string;
|
|
797
798
|
stepOrder: number;
|
|
798
|
-
|
|
799
|
-
_id: string;
|
|
799
|
+
tool: boolean;
|
|
800
800
|
}[];
|
|
801
801
|
isDone: boolean;
|
|
802
802
|
continueCursor: import("convex/server").Cursor;
|
|
@@ -809,9 +809,15 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
809
809
|
_id: import("convex/values").GenericId<"messages">;
|
|
810
810
|
_creationTime: number;
|
|
811
811
|
id?: string | undefined;
|
|
812
|
-
|
|
812
|
+
userId?: string | undefined;
|
|
813
|
+
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;
|
|
814
|
+
fileIds?: import("convex/values").GenericId<"files">[] | undefined;
|
|
815
|
+
files?: any[] | undefined;
|
|
816
|
+
error?: string | undefined;
|
|
817
|
+
agentName?: string | undefined;
|
|
818
|
+
model?: string | undefined;
|
|
819
|
+
provider?: string | undefined;
|
|
813
820
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
814
|
-
reasoning?: string | undefined;
|
|
815
821
|
message?: {
|
|
816
822
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
817
823
|
role: "user";
|
|
@@ -885,16 +891,17 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
885
891
|
role: "system";
|
|
886
892
|
content: string;
|
|
887
893
|
} | undefined;
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
+
text?: string | undefined;
|
|
895
|
+
reasoning?: string | undefined;
|
|
896
|
+
usage?: {
|
|
897
|
+
promptTokens: number;
|
|
898
|
+
completionTokens: number;
|
|
899
|
+
totalTokens: number;
|
|
900
|
+
} | undefined;
|
|
894
901
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
895
902
|
sources?: {
|
|
896
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
897
903
|
title?: string | undefined;
|
|
904
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
898
905
|
id: string;
|
|
899
906
|
sourceType: "url";
|
|
900
907
|
url: string;
|
|
@@ -907,11 +914,6 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
907
914
|
type: "redacted";
|
|
908
915
|
data: string;
|
|
909
916
|
})[] | undefined;
|
|
910
|
-
usage?: {
|
|
911
|
-
promptTokens: number;
|
|
912
|
-
completionTokens: number;
|
|
913
|
-
totalTokens: number;
|
|
914
|
-
} | undefined;
|
|
915
917
|
warnings?: ({
|
|
916
918
|
details?: string | undefined;
|
|
917
919
|
type: "unsupported-setting";
|
|
@@ -924,22 +926,21 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
924
926
|
type: "other";
|
|
925
927
|
message: string;
|
|
926
928
|
})[] | undefined;
|
|
927
|
-
|
|
928
|
-
agentName?: string | undefined;
|
|
929
|
-
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;
|
|
929
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
930
930
|
parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
931
931
|
stepId?: string | undefined;
|
|
932
|
-
tool: boolean;
|
|
933
|
-
threadId: import("convex/values").GenericId<"threads">;
|
|
934
932
|
status: "pending" | "success" | "failed";
|
|
935
933
|
order: number;
|
|
934
|
+
threadId: import("convex/values").GenericId<"threads">;
|
|
936
935
|
stepOrder: number;
|
|
936
|
+
tool: boolean;
|
|
937
937
|
} | null)[]>>;
|
|
938
938
|
/** @deprecated Use listMessagesByThreadId instead. */
|
|
939
939
|
export declare const getThreadMessages: import("convex/server").RegisteredQuery<"public", {
|
|
940
940
|
deprecated: "Use listMessagesByThreadId instead";
|
|
941
941
|
}, Promise<never>>;
|
|
942
942
|
export declare const searchMessages: import("convex/server").RegisteredAction<"public", {
|
|
943
|
+
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
943
944
|
text?: string | undefined;
|
|
944
945
|
vector?: number[] | undefined;
|
|
945
946
|
vectorModel?: string | undefined;
|
|
@@ -948,15 +949,19 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
948
949
|
before: number;
|
|
949
950
|
after: number;
|
|
950
951
|
} | undefined;
|
|
951
|
-
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
952
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
953
952
|
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
953
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
954
954
|
limit: number;
|
|
955
955
|
}, Promise<{
|
|
956
956
|
id?: string | undefined;
|
|
957
|
-
|
|
957
|
+
userId?: string | undefined;
|
|
958
|
+
embeddingId?: string | undefined;
|
|
959
|
+
fileIds?: string[] | undefined;
|
|
960
|
+
error?: string | undefined;
|
|
961
|
+
agentName?: string | undefined;
|
|
962
|
+
model?: string | undefined;
|
|
963
|
+
provider?: string | undefined;
|
|
958
964
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
959
|
-
reasoning?: string | undefined;
|
|
960
965
|
message?: {
|
|
961
966
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
962
967
|
role: "user";
|
|
@@ -1030,15 +1035,17 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1030
1035
|
role: "system";
|
|
1031
1036
|
content: string;
|
|
1032
1037
|
} | undefined;
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
+
text?: string | undefined;
|
|
1039
|
+
reasoning?: string | undefined;
|
|
1040
|
+
usage?: {
|
|
1041
|
+
promptTokens: number;
|
|
1042
|
+
completionTokens: number;
|
|
1043
|
+
totalTokens: number;
|
|
1044
|
+
} | undefined;
|
|
1038
1045
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1039
1046
|
sources?: {
|
|
1040
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1041
1047
|
title?: string | undefined;
|
|
1048
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1042
1049
|
id: string;
|
|
1043
1050
|
sourceType: "url";
|
|
1044
1051
|
url: string;
|
|
@@ -1051,11 +1058,6 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1051
1058
|
type: "redacted";
|
|
1052
1059
|
data: string;
|
|
1053
1060
|
})[] | undefined;
|
|
1054
|
-
usage?: {
|
|
1055
|
-
promptTokens: number;
|
|
1056
|
-
completionTokens: number;
|
|
1057
|
-
totalTokens: number;
|
|
1058
|
-
} | undefined;
|
|
1059
1061
|
warnings?: ({
|
|
1060
1062
|
details?: string | undefined;
|
|
1061
1063
|
type: "unsupported-setting";
|
|
@@ -1068,26 +1070,29 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1068
1070
|
type: "other";
|
|
1069
1071
|
message: string;
|
|
1070
1072
|
})[] | undefined;
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
tool: boolean;
|
|
1075
|
-
threadId: string;
|
|
1073
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1074
|
+
_id: string;
|
|
1075
|
+
_creationTime: number;
|
|
1076
1076
|
status: "pending" | "success" | "failed";
|
|
1077
1077
|
order: number;
|
|
1078
|
+
threadId: string;
|
|
1078
1079
|
stepOrder: number;
|
|
1079
|
-
|
|
1080
|
-
_id: string;
|
|
1080
|
+
tool: boolean;
|
|
1081
1081
|
}[]>>;
|
|
1082
1082
|
export declare const _fetchSearchMessages: import("convex/server").RegisteredQuery<"internal", {
|
|
1083
1083
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
1084
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
1085
1084
|
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1085
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
1086
1086
|
textSearchMessages?: {
|
|
1087
1087
|
id?: string | undefined;
|
|
1088
|
-
|
|
1088
|
+
userId?: string | undefined;
|
|
1089
|
+
embeddingId?: string | undefined;
|
|
1090
|
+
fileIds?: string[] | undefined;
|
|
1091
|
+
error?: string | undefined;
|
|
1092
|
+
agentName?: string | undefined;
|
|
1093
|
+
model?: string | undefined;
|
|
1094
|
+
provider?: string | undefined;
|
|
1089
1095
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1090
|
-
reasoning?: string | undefined;
|
|
1091
1096
|
message?: {
|
|
1092
1097
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1093
1098
|
role: "user";
|
|
@@ -1161,15 +1166,17 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1161
1166
|
role: "system";
|
|
1162
1167
|
content: string;
|
|
1163
1168
|
} | undefined;
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
+
text?: string | undefined;
|
|
1170
|
+
reasoning?: string | undefined;
|
|
1171
|
+
usage?: {
|
|
1172
|
+
promptTokens: number;
|
|
1173
|
+
completionTokens: number;
|
|
1174
|
+
totalTokens: number;
|
|
1175
|
+
} | undefined;
|
|
1169
1176
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1170
1177
|
sources?: {
|
|
1171
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1172
1178
|
title?: string | undefined;
|
|
1179
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1173
1180
|
id: string;
|
|
1174
1181
|
sourceType: "url";
|
|
1175
1182
|
url: string;
|
|
@@ -1182,11 +1189,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1182
1189
|
type: "redacted";
|
|
1183
1190
|
data: string;
|
|
1184
1191
|
})[] | undefined;
|
|
1185
|
-
usage?: {
|
|
1186
|
-
promptTokens: number;
|
|
1187
|
-
completionTokens: number;
|
|
1188
|
-
totalTokens: number;
|
|
1189
|
-
} | undefined;
|
|
1190
1192
|
warnings?: ({
|
|
1191
1193
|
details?: string | undefined;
|
|
1192
1194
|
type: "unsupported-setting";
|
|
@@ -1199,16 +1201,14 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1199
1201
|
type: "other";
|
|
1200
1202
|
message: string;
|
|
1201
1203
|
})[] | undefined;
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
tool: boolean;
|
|
1206
|
-
threadId: string;
|
|
1204
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1205
|
+
_id: string;
|
|
1206
|
+
_creationTime: number;
|
|
1207
1207
|
status: "pending" | "success" | "failed";
|
|
1208
1208
|
order: number;
|
|
1209
|
+
threadId: string;
|
|
1209
1210
|
stepOrder: number;
|
|
1210
|
-
|
|
1211
|
-
_id: string;
|
|
1211
|
+
tool: boolean;
|
|
1212
1212
|
}[] | undefined;
|
|
1213
1213
|
limit: number;
|
|
1214
1214
|
messageRange: {
|
|
@@ -1218,9 +1218,14 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1218
1218
|
vectorIds: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096">[];
|
|
1219
1219
|
}, Promise<{
|
|
1220
1220
|
id?: string | undefined;
|
|
1221
|
-
|
|
1221
|
+
userId?: string | undefined;
|
|
1222
|
+
embeddingId?: string | undefined;
|
|
1223
|
+
fileIds?: string[] | undefined;
|
|
1224
|
+
error?: string | undefined;
|
|
1225
|
+
agentName?: string | undefined;
|
|
1226
|
+
model?: string | undefined;
|
|
1227
|
+
provider?: string | undefined;
|
|
1222
1228
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1223
|
-
reasoning?: string | undefined;
|
|
1224
1229
|
message?: {
|
|
1225
1230
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1226
1231
|
role: "user";
|
|
@@ -1294,15 +1299,17 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1294
1299
|
role: "system";
|
|
1295
1300
|
content: string;
|
|
1296
1301
|
} | undefined;
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
+
text?: string | undefined;
|
|
1303
|
+
reasoning?: string | undefined;
|
|
1304
|
+
usage?: {
|
|
1305
|
+
promptTokens: number;
|
|
1306
|
+
completionTokens: number;
|
|
1307
|
+
totalTokens: number;
|
|
1308
|
+
} | undefined;
|
|
1302
1309
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1303
1310
|
sources?: {
|
|
1304
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1305
1311
|
title?: string | undefined;
|
|
1312
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1306
1313
|
id: string;
|
|
1307
1314
|
sourceType: "url";
|
|
1308
1315
|
url: string;
|
|
@@ -1315,11 +1322,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1315
1322
|
type: "redacted";
|
|
1316
1323
|
data: string;
|
|
1317
1324
|
})[] | undefined;
|
|
1318
|
-
usage?: {
|
|
1319
|
-
promptTokens: number;
|
|
1320
|
-
completionTokens: number;
|
|
1321
|
-
totalTokens: number;
|
|
1322
|
-
} | undefined;
|
|
1323
1325
|
warnings?: ({
|
|
1324
1326
|
details?: string | undefined;
|
|
1325
1327
|
type: "unsupported-setting";
|
|
@@ -1332,28 +1334,31 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1332
1334
|
type: "other";
|
|
1333
1335
|
message: string;
|
|
1334
1336
|
})[] | undefined;
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
tool: boolean;
|
|
1339
|
-
threadId: string;
|
|
1337
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1338
|
+
_id: string;
|
|
1339
|
+
_creationTime: number;
|
|
1340
1340
|
status: "pending" | "success" | "failed";
|
|
1341
1341
|
order: number;
|
|
1342
|
+
threadId: string;
|
|
1342
1343
|
stepOrder: number;
|
|
1343
|
-
|
|
1344
|
-
_id: string;
|
|
1344
|
+
tool: boolean;
|
|
1345
1345
|
}[]>>;
|
|
1346
1346
|
export declare const textSearch: import("convex/server").RegisteredQuery<"public", {
|
|
1347
1347
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
1348
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
1349
1348
|
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1349
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
1350
1350
|
text: string;
|
|
1351
1351
|
limit: number;
|
|
1352
1352
|
}, Promise<{
|
|
1353
1353
|
id?: string | undefined;
|
|
1354
|
-
|
|
1354
|
+
userId?: string | undefined;
|
|
1355
|
+
embeddingId?: string | undefined;
|
|
1356
|
+
fileIds?: string[] | undefined;
|
|
1357
|
+
error?: string | undefined;
|
|
1358
|
+
agentName?: string | undefined;
|
|
1359
|
+
model?: string | undefined;
|
|
1360
|
+
provider?: string | undefined;
|
|
1355
1361
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1356
|
-
reasoning?: string | undefined;
|
|
1357
1362
|
message?: {
|
|
1358
1363
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1359
1364
|
role: "user";
|
|
@@ -1427,15 +1432,17 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1427
1432
|
role: "system";
|
|
1428
1433
|
content: string;
|
|
1429
1434
|
} | undefined;
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
+
text?: string | undefined;
|
|
1436
|
+
reasoning?: string | undefined;
|
|
1437
|
+
usage?: {
|
|
1438
|
+
promptTokens: number;
|
|
1439
|
+
completionTokens: number;
|
|
1440
|
+
totalTokens: number;
|
|
1441
|
+
} | undefined;
|
|
1435
1442
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1436
1443
|
sources?: {
|
|
1437
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1438
1444
|
title?: string | undefined;
|
|
1445
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1439
1446
|
id: string;
|
|
1440
1447
|
sourceType: "url";
|
|
1441
1448
|
url: string;
|
|
@@ -1448,11 +1455,6 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1448
1455
|
type: "redacted";
|
|
1449
1456
|
data: string;
|
|
1450
1457
|
})[] | undefined;
|
|
1451
|
-
usage?: {
|
|
1452
|
-
promptTokens: number;
|
|
1453
|
-
completionTokens: number;
|
|
1454
|
-
totalTokens: number;
|
|
1455
|
-
} | undefined;
|
|
1456
1458
|
warnings?: ({
|
|
1457
1459
|
details?: string | undefined;
|
|
1458
1460
|
type: "unsupported-setting";
|
|
@@ -1465,15 +1467,13 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1465
1467
|
type: "other";
|
|
1466
1468
|
message: string;
|
|
1467
1469
|
})[] | undefined;
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
tool: boolean;
|
|
1472
|
-
threadId: string;
|
|
1470
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1471
|
+
_id: string;
|
|
1472
|
+
_creationTime: number;
|
|
1473
1473
|
status: "pending" | "success" | "failed";
|
|
1474
1474
|
order: number;
|
|
1475
|
+
threadId: string;
|
|
1475
1476
|
stepOrder: number;
|
|
1476
|
-
|
|
1477
|
-
_id: string;
|
|
1477
|
+
tool: boolean;
|
|
1478
1478
|
}[]>>;
|
|
1479
1479
|
//# sourceMappingURL=messages.d.ts.map
|